I’m not sure what is happening. I have this code:
`case (XMLREADER::ELEMENT):
$node_type = $reader->nodeType;
$node_name = $reader->name;
if ($node_name == "gs_relay_rpc"){//I need this to work now
$node_value = $reader->readInnerXML();
get_xml_data("<gs_relay > ".$node_value."</gs_relay>");
include($rpc_folder.$node_name.".php");
}`
which is obviously part of a switch statement and it works perfectly. Then I have this code :
`case (XMLREADER::ELEMENT):
$node_type = $reader->nodeType;
echo $node_type."->";
$node_name = $reader->name;
if ($node_name == "itp_exchange_rpc"){
echo $node_name." = ";
$reader->read();
$node_value = $reader->readInnerXML();
get_xml_data("<test > ".$node_value."</test>");
} else {
echo $node_name." = ";
$reader->read();
$node_value = $reader->value;
echo $node_value."<br>";
}`
Which is practically a carbon copy of the first block but with this second block readInnerXML() returns a blank. The xml chunk is valid because it does get parsed. My problem is that I need to recurse on it but I can’t since the function returns blank.
The xml:
<itp_exchange_rpc > <itp_floor > <itp_floor_name > test@hotmail.com</itp_floor_name> </itp_floor></itp_exchange_rpc>
Turns out God was smiting me. It took a car crash in the morning to show me I had one too many
reader->read()in the second block. I’m getting the string fine now.