Edit report at https://bugs.php.net/bug.php?id=40526&edit=1
ID: 40526 Updated by: maar...@php.net Reported by: edboy002 at gmail dot com Summary: asXML() function formatting -Status: Open +Status: Closed Type: Feature/Change Request Package: SimpleXML related Operating System: Windows XP PHP Version: 5.2.1 -Assigned To: +Assigned To: maarten Block user comment: N Private report: N New Comment: There are alternatives for formatting and this isn't really the responsibility of the asXML() method. Previous Comments: ------------------------------------------------------------------------ [2011-03-22 23:36:28] tom at samplonius dot org The toXML() method doesn't need formatting, as you can use the XML_Beautifier module in PEARK, or if you prefer the DOM output method, create a DOM object, and then use the simplexml_import_dom() function to make it accessible in SimpleXML. Then you can access the XML either via DOM or via SimpleXML. ------------------------------------------------------------------------ [2007-02-17 20:42:42] edboy002 at gmail dot com Description: ------------ I was outputting a SimpleXML document into an XML file, and it came out as a full string. Will there be support for formatting the output, like in DOM? Reproduce code: --------------- $dom->asXML($ext); # Is there a way to format this like in DOM? Expected result: ---------------- <q> <a>blah</a> <b /> </q> Actual result: -------------- <q><a>blah</a><b /></q> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=40526&edit=1