Lines Matching refs:parser
21 $parser = xml_parser_create();
22 echo "old option value: "; var_dump(xml_parser_get_option($parser, XML_OPTION_PARSE_HUGE));
23 xml_parser_set_option($parser, XML_OPTION_PARSE_HUGE, $huge);
24 echo "new option value: "; var_dump(xml_parser_get_option($parser, XML_OPTION_PARSE_HUGE));
25 xml_set_element_handler($parser, function($parser, $data) {
28 }, function($parser, $data) {
30 return $parser;
39 $parser = createParser(false);
40 $ret = xml_parse($parser, $long_xml_head, true);
41 echo "ret = $ret (", xml_error_string(xml_get_error_code($parser)), ")\n";
44 $parser = createParser(true);
45 $ret = xml_parse($parser, $long_xml_head, false);
46 echo "ret = $ret (", xml_error_string(xml_get_error_code($parser)), ")\n";
47 $ret = xml_parse($parser, $long_xml_tail, true);
48 echo "ret = $ret (", xml_error_string(xml_get_error_code($parser)), ")\n";
51 $parser = createParser(false);
52 $ret = xml_parse_into_struct($parser, $long_xml_head, $values, $index);
53 echo "ret = $ret (", xml_error_string(xml_get_error_code($parser)), ")\n";
56 $parser = createParser(true);
57 $ret = xml_parse_into_struct($parser, $long_xml_head . $long_xml_tail, $values, $index);
59 echo "ret = $ret (", xml_error_string(xml_get_error_code($parser)), ")\n";