Hey All!
I'm having trouble getting the nodeValue of a specific set of nodes. The xml looks like this:
<root>
<SpecialParameter>Some Text</SpecialParameter>
<SpecialInfo someNumber="123456789"></SpecialInfo>
<book>
<title>Rusty Bedsprings</title>
<author>I. P. Knightly</title>
</book>
<book>
<title>Rush To The Out House</title>
<author>Willie Makeit</title>
</book>
</root>
What I need to get are the <SpecialParameter> and the number in <SpecialInfo> so what I have is this:
$sp = $doc->getElementsByTagName( "SpecialParameter" );
$directive = $sp->item(0)->nodeValue;
$si = $doc->getElementsByTagName( "SpecialInfo" );
$directive = $si->item(0)->nodeValue;
Both return objects but the objects are empty... What's the secret to accessing the first two nodes? Or, for that matter if <book> has some text inside the book tag like <book isbn="0U812"><title></title><author></author></book> how do you pull out the isbn?
Thanks!