note 102343 deleted from class.domdocument by danbrown

From: Date: Wed, 09 Feb 2011 21:19:18 +0000
Subject: note 102343 deleted from class.domdocument by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-176821@lists.php.net to get a copy of this message
Note Submitter: MattD ---- Just to add to tloach's comment, the formatOutput bug does not save HTML formatting properly. So if you're trying to save HTML a simple fix is to go ahead and still set the formatOutput to true and save as XML, but then strip the XML tag. <?php ... $document->formatOutput = true; $output = $document->saveXML(); $output = str_replace('<?xml version="1.0"?>',null,$output); echo $output; ?> This will actually do you a favor if you want XHTML instead of HTML 4.01.

« previous php.notes (#176821) next »