quote:
Originally posted by TheGeek
I never got it to work.
It just provides an opentag event and a closetag event AFAIK.
wtf? its simple as to use and parse eg
lets say you have to parse
code:
<temp>
<item1>blah</item1>
<item2>blah2</item2>
</temp>
all you do is create a instance of the xml_parser , get it to parse that xml above($toparse) and free the xml_parser
code:
$xml_parser = xml_parser_create();
xml_parse_into_struct($xml_parser, $toparse, $arr_vals ,$index);
xml_parser_free($xml_parser);
$toparse is the xml code
$arr_vals is an array which has the names of the nodes and a refernce to the $index array
$index array has the values of the nodes
then to access the content of a node we just use something like where $node is the node
$arr_vals[$index[$node][0]]['value'];