#25666 [Opn->Fbk]: XML namespaces broken in PHP5
| From: | sniper@php.net | Date: | Fri, 26 Sep 2003 07:54:27 +0000 |
| Subject: | #25666 [Opn->Fbk]: XML namespaces broken in PHP5 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-48126@lists.php.net to get a copy of this message | ||
ID: 25666
Updated by: sniper@php.net
Reported By: skissane at ics dot mq dot edu dot au
-Status: Open
+Status: Feedback
Bug Type: XML related
Operating System: Linux
PHP Version: 5CVS-2003-09-25 (dev)
New Comment:
What was the configure line you used to configure PHP?
Previous Comments:
------------------------------------------------------------------------
[2003-09-25 23:29:36] skissane at ics dot mq dot edu dot au
Description:
------------
Namespace support by the xml_* functions is broken in PHP5 latest
snapshot (works fine in PHP4).
Reproduce code:
---------------
<?php
function startElement($parser,$name,$attribs) {
echo $name . "\n";
}
function endElement($parser,$name) {
}
$parser = xml_parser_create_ns("UTF-8","@");
xml_set_element_handler($parser,'startElement','endElement');
xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
xml_parse($parser,
"<foo:a xmlns:foo=\"http://example.com/foo\"
xmlns:bar=\"http://example.com/bar\"><bar:b
/></foo>\n");
xml_parser_free($parser);
?>
Expected result:
----------------
PHP 4.3.3 gives output:
http://example.com/foo@a
http://example.com/bar@b
Actual result:
--------------
http://example.com/foo:a
bar:b
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25666&edit=1