php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #29494 Need format option in DOMDocument->saveXML()
Submitted: 2004-08-02 18:10 UTC Modified: 2004-08-23 00:04 UTC
From: tony at marston-home dot demon dot co dot uk Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.0.0 OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tony at marston-home dot demon dot co dot uk
New email:
PHP Version: OS:

 

 [2004-08-02 18:10 UTC] tony at marston-home dot demon dot co dot uk
Description:
------------
When creating an XML file from DOMDocument->saveXML() it would be very nice to have a format option just like the one in DomDocument->dump_mem(). In this way the XML file can be viewable in my text editor instead of existing on just a single line. There should be a linebreak after every closing tag, and child elements should be indented.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-22 19:39 UTC] tony at marston-home dot demon dot co dot uk
This option would also be nice on DOMDocument->save() when writing the XML document to a disk file.
 [2004-08-22 23:18 UTC] chregu@php.net
The option is already there:

$domDocument->formatOutput = true;

 [2004-08-23 00:04 UTC] tony at marston-home dot demon dot co dot uk
You are correct. Pity it was not documented.
 [2013-08-28 13:57 UTC] daverandom@php.net
Automatic comment from SVN on behalf of daverandom
Revision: http://svn.php.net/viewvc/?view=revision&revision=331215
Log: Added a better description of what the apc.shm_strings_buffer option does.

--
Provided by anonymous #29494 (Danack@basereality.com)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Aug 15 16:00:03 2025 UTC