#32457 [Opn->Bgs]: xml_parse_into_struct stops short without error if xml attributes are unquoted
| From: | rrichards@php.net | Date: | Fri, 25 Mar 2005 18:57:42 +0000 |
| Subject: | #32457 [Opn->Bgs]: xml_parse_into_struct stops short without error if xml attributes are unquoted | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-75867@lists.php.net to get a copy of this message | ||
ID: 32457
Updated by: rrichards@php.net
Reported By: cephalicmarble at blueyonder dot co dot uk
-Status: Open
+Status: Bogus
Bug Type: XML related
Operating System: Linux
PHP Version: 5.0.3
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
check return and error values
Previous Comments:
------------------------------------------------------------------------
[2005-03-25 19:05:45] cephalicmarble at blueyonder dot co dot uk
Description:
------------
xml_parse_into_struct returns nodes correctly until it encounters an
unquoted attribute. The function bombs without error.
Reproduce code:
---------------
<?php
$sample =
"<?xml version=\"1.0\"?><doc><test
attr=unquoted/><next/><again/></doc>";
$parser = xml_parser_create();
$res = xml_parse_into_struct($parser,$sample,$vals,$index);
xml_parser_free($parser);
//var_dump($vals);
echo sizeof($vals);
?>
Expected result:
----------------
sizeof($vals) is one. Quote the attribute and it should be 5.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32457&edit=1