Maybe it's impossible, but I am wondering if it is possible to use the same parser to parse multiple documents without freeing and recreating the parser. For example, why can't I do this:
$parser = xml_parser_create();
xml_parse_into_struct($parser, $document1, $values1, $index1);
xml_parse_into_struct($parser, $document2, $values2, $index2);
xml_parser_free($parser);
instead of this?
$parser = xml_parser_create();
xml_parse_into_struct($parser, $document1, $values1, $index1);
xml_parser_free($parser);
$parser = xml_parser_create();
xml_parse_into_struct($parser, $document2, $values2, $index2);
xml_parser_free($parser);
Is there a way to reuse a parser resource for multple documents without freeing and recreating it?
Thanks in advance.