|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-10-03 08:46 UTC] chregu@php.net
[2005-10-03 09:07 UTC] apc at hotmail dot kg
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 19:00:01 2025 UTC |
Description: ------------ When I try to parse XML into struct twice using the same parser - second attempt fails. Reproduce code: --------------- <?php $t=('../test/eg_snews.xml'); // any XML file $XMLContent = file_get_contents($t); $th = xml_parser_create(); echo "<hr>"; var_dump(xml_parse_into_struct ($th, $XMLContent, $V)); ; echo "<br>Result size: ".sizeof($V); echo "<br>Error code: ".$ec=xml_get_error_code($th); echo "<br>Error text: ".xml_error_string($ec); echo "<hr>"; var_dump(xml_parse_into_struct ($th, $XMLContent, $V)); ; echo "<br>Result size: ".sizeof($V); echo "<br>Error code: ".$ec=xml_get_error_code($th); echo "<br>Error text: ".xml_error_string($ec); ?> Expected result: ---------------- int(1) Result size: 301 Error code: 0 Error text: int(1) Result size: 301 Error code: 0 Error text: Actual result: -------------- int(1) Result size: 301 Error code: 0 Error text: int(0) Result size: 0 Error code: 9 Error text: junk after document element