|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #56711 Human readable XML output
Submitted: 2005-12-08 14:55 UTC Modified: 2006-10-30 06:30 UTC
From: Assigned: mfp (profile)
Status: Closed Package: SCA_SDO (PECL)
PHP Version: 5_1 CVS-2005-12-08 OS: FreeBSD6.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
9 + 3 = ?
Subscribe to this entry?

 [2005-12-08 14:55 UTC]
SDO_DAS_XML->saveDataObjectToString() spits outs XML in non-human readable format.
Is quite an overhead for the solo purpose of keeping human readable format to run
$dom = new DOMDocument;
$dom->formatOutput = true;
print $dom->saveXML();

I'd love an option like in ext/dom to format output in human readable manners.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-09 11:31 UTC]
Bjori, that's a good idea. I will talk to the implementors of the underlying C++ layer and see if I can get them to expose this: if I can then I will expose it in turn, probably as a method on the document, as DOMDocument does.

Thanks for including a quickfix/workaround by the way.
 [2006-02-24 10:14 UTC]
It took a while but we just released our 0.9.0 code and now saveFile() and saveString() take an optional integer argument which causes the xml to be formatted and is the number of spaces to indent each containing level. So, 2 would be a common number, 0 would cause the document to be left-aligned, and -1 means leave it alone.
 [2006-03-01 12:05 UTC]
Love it. Thanks.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Jan 29 05:03:33 2022 UTC