#41405 [Opn->Bgs]: asXML() does not return the whole xml

From: Date: Wed, 16 May 2007 11:50:42 +0000
Subject: #41405 [Opn->Bgs]: asXML() does not return the whole xml
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-112678@lists.php.net to get a copy of this message
ID: 41405 Updated by: rrichards@php.net Reported By: longrennet at hotmail dot com -Status: Open +Status: Bogus Bug Type: *General Issues Operating System: Linux ES3 PHP Version: 5.2.2 New Comment: Works fine. Try viewing the actual output and not what you see in the browser. Previous Comments: ------------------------------------------------------------------------ [2007-05-16 02:00:32] longrennet at hotmail dot com Description: ------------ I'd like to print the xml string in my code, so i use function asXML(). But it just return the element value in the xml. Is the code before i use asXML effort it? Reproduce code: --------------- <?php .......... .......... ..........//Here is some code. If there is no these codes,it will be OK. $string = <<<XML <a> <b> <c>text</c> <c>stuff</c> </b> <d> <c>code</c> </d> </a> XML; $xml = new SimpleXMLElement($string); echo $xml->asXML(); ?> Expected result: ---------------- <?xml version="1.0" ?><a><b><c>text</c><c>stuff</c></b><d><c>code</c></d></a> Actual result: -------------- text stuff code ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41405&edit=1

« previous php.bugs (#112678) next »