Hi,
I have an xml_parse function within a nested loop to parse a two dimensional array containing XML.
The handler functions echo the appropriate html tags and content. When the loop begins, I get results from the first element in the array, but that's all.
Is there something I'm missing with the parse_xml function? I checked the manual and didn't find myself with a great understanding of the isFinal portion of the syntax. Perhaps my problem is based there. I've tried adding 1,0 and true/false to the end of the function with no change in results.
The loop is setup like this:
for($i=0; $i<count($contentXMLKeys); $i++) {
for($j=0; $j<count($contentXMLSubKeys); $j++) {
xml_parse($xmlParser, $contentXML[$contentXMLKeys[$i]][$contentXMLSubKeys[$j]]);
}
}
It seems as though xml_parse() only parses the first element - $contentXML[0][0] - of the array and then doesn't produce anymore results. It does output the html for that first element. Using echo to test the iteration variables in each loop indicate it's moving through the array as expected.
Does anyone have any ideas?
Thanks,
Shane
B.T.W. I posted a similar question at devshed but haven't received any feedback so please forgive me if you're in that forum as well.