2
XML parser test, default namespaces
5
if (! @xml_parser_create_ns('ISO-8859-1')) { die("skip xml_parser_create_ns is not supported on this plattform");}
9
function start_elem($parser,$name,$attribs) {
17
<a xmlns="http://example.com/foo"
18
xmlns:bar="http://example.com/bar"
19
xmlns:baz="http://example.com/baz">
21
<bar:c xmlns:bar="http://example.com/foo"/>
25
$parser = xml_parser_create_ns("ISO-8859-1","@");
26
xml_set_element_handler($parser,'start_elem','end_elem');
27
xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
28
xml_parse($parser, $xml);
29
xml_parser_free($parser);
32
string(24) "http://example.com/foo@a"
33
string(24) "http://example.com/bar@b"
34
string(24) "http://example.com/foo@c"