| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2004-03-31 12:16 UTC] rrichards@php.net
  [2011-04-25 09:23 UTC] bacurastone at ymail dot com
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 15:00:01 2025 UTC | 
Description: ------------ The formatOutput feature doesn' t work with documents, that use DomDocument::load() for creation. But it works with in memory DOM Documents. Reproduce code: --------------- $dom = new DomDocument(); $file = "/path/to/file/dom.xml"; if (file_exists($file)) { $dom->load($file); } else { $dom->appendChild(dom->createElement('foobar')); } printf("<pre>%s</pre>", htmlentities($dom->saveXML()));