Req #40526 [Com]: asXML() function formatting
| From: | tom at samplonius dot org | Date: | Tue, 22 Mar 2011 22:36:28 +0000 |
| Subject: | Req #40526 [Com]: asXML() function formatting | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-159712@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=40526&edit=1
ID: 40526
Comment by: tom at samplonius dot org
Reported by: edboy002 at gmail dot com
Summary: asXML() function formatting
Status: Open
Type: Feature/Change Request
Package: SimpleXML related
Operating System: Windows XP
PHP Version: 5.2.1
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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 http://bugs.php.net/bug.php?id=40526&edit=1