pletcherhtm
New Member
This is my structure:\[code\]<Users> <User> <username>admin</username> <server>10.xx.xx.xx</server> <image>images/pic.png</image> </User> <User> <username>bob</username> <server>10.xx.xx.xx</server> <image>images/pic2.png</image> </User></Users>\[/code\]Now I have this code that gets me a server value from node which has certain username that I am searching for.\[code\]$query = '//Users/User/username[. = "'.$_SESSION['SESS_FIRST_NAME'].'"]';$entries = $xpath->query($query);foreach ($entries as $entry) { //Getting the "server" node value $server=$entry->nextSibling->nextSibling->nodeValue; //I wanted to have one more variable here which will save me the image string in the global php variable $images=$entry->nextSibling->nextSibling->nextSibling->nodeValue; //this is giving me a server value instead of image value }\[/code\]