Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I can reference a XML tag with the code below but don't understand how I can reference it's child nodes (or tags)Code: Select all
$dom = new DomDocument;
$dom->load("book.xml");
$names = $dom->getElementsByTagName("competition");
foreach ($names as $name) {
$arrayOfPlayerNames[$i] = $name -> nodeValue.'<br />';
echo 'name '.$i.' is: '.$arrayOfPlayerNames[$i];
$i++;
}I want to know how I can see the childldren of <competition>.
I'm trying to parse selected parts of the xml file to mysql.
Many thanks
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]