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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bjori@php.net
New email:
PHP Version: OS:

 

 [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

Pull Requests

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 Dec 26 20:01:29 2024 UTC