ID:               41405
 Updated by:       [EMAIL PROTECTED]
 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

Reply via email to