ID: 32307
Updated by: [EMAIL PROTECTED]
Reported By: mike at cocoweb dot co dot uk
-Status: Open
+Status: Bogus
Bug Type: SimpleXML related
Operating System: Win XP
PHP Version: 5.0.3
New Comment:
That's not invalid XML. <b/> is identical to <b></b> in XML and is
perfectly valid.
Previous Comments:
------------------------------------------------------------------------
[2005-03-15 06:20:53] mike at cocoweb dot co dot uk
Description:
------------
asXML() function generates an XML string which contains invalid XML.
Reproduce code:
---------------
// Valid XML
$string =
"
<a>
<b></b>
</a>
";
// Load the string into the simplexml framework
$XMLObject = simplexml_load_string($string);
// View the XML object in string representation.
echo $XMLObject->asXML();
Expected result:
----------------
<a>
<b></b>
</a>
Actual result:
--------------
<a>
<b/>
</a>
<!--
Now the <b> tag is unclosed! i.e. invalid XML.
I am probably doing something wrong... so please help :o)
I have checked the documentation and examples on other websites all to
no avail. Couldn't find anything relevant using Google.
-->
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32307&edit=1