php.net |  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: bjori@php.net 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:
MUST BE VALID
Solve the problem:
19 - 6 = ?
Subscribe to this entry?

 
 [2005-12-08 14:55 UTC] bjori@php.net
Description:
------------
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->loadXML(SDO_DAS_XML->saveDataObjectToString());
$dom->formatOutput = true;
print $dom->saveXML();

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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-09 11:31 UTC] mfp@php.net
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] mfp@php.net
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] bjori@php.net
Love it. Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 12:01:28 2024 UTC