$elements= $xmlDoc->getElementsByTagName("naujiena");
$commentsList = $elements->item(0)->getElementsByTagName("komentarai");
$elements2 = $commentsList->item(0)->getElementsByTagName("autorius");
[COLOR=#ff0000]$value = $elements2->item(0)->nodeValue;[/COLOR]
error occurs on red line. xml document's tree is followed correctly in code. Any help?
No replies to this topic
#1
Posted 21 July 2011 - 07:29 AM
Hi. I am trying to read value of xml documents' node, but always get errors like that: trying to get property of non-object in <server address> line <line number>. Here's my code:
|
|
|
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









