|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-03-15 06:35 UTC] rasmus@php.net
[2005-03-15 16:22 UTC] mike at cocoweb dot co dot uk
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 22:00:01 2025 UTC |
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. -->