Edit report at https://bugs.php.net/bug.php?id=47137&edit=1
ID: 47137 Comment by: joscha at feth dot com Reported by: romain dot lalaut at laposte dot net Summary: LIBXML_NOXMLDECL is not working anymore Status: Not a bug Type: Bug Package: XML related Operating System: Linux PHP Version: 5.3.0alpha3 Block user comment: N Private report: N New Comment: Is there any update on this issue? Previous Comments: ------------------------------------------------------------------------ [2011-08-11 10:31:38] suit at rebell dot at It is stoll not fixed and its very annoying, if you want to create XML documents without declaration. Bug #50989 works for me, but its still no satisfying solution. Fix this either in PHP or at least in the Documentation. ------------------------------------------------------------------------ [2010-05-28 03:45:36] jpatokal at iki dot fi This is not "bogus" at all. See http://www.php.net/manual/en/libxml.constants.php: LIBXML_NOXMLDECL ( integer ) Drop the XML declaration when saving a document >From that, I'd expect saveXML to drop the XML declaration as promised, but it >does not, so it's broken. See also http://bugs.php.net/bug.php?id=50989. ------------------------------------------------------------------------ [2009-02-03 14:45:31] rricha...@php.net That is a save option which hasn't yet been implemented so has never worked ------------------------------------------------------------------------ [2009-01-17 13:58:07] romain dot lalaut at laposte dot net Description: ------------ It seems that saving a DOMDocument which is loaded with LIBXML_NOXMLDECL doesn't avoid to get the xml declaration. It is a big problem to produce a xhtml document for internet because IE6 is not dead yet. Tested with libxml2 2.6.32 and 2.7.2 Reproduce code: --------------- <?php $xml = '<myxml/>'; $doc = new DOMDocument(); $doc->loadXml($xml, LIBXML_NOXMLDECL); echo $doc->saveXML(); Expected result: ---------------- <myxml/> Actual result: -------------- <?xml version="1.0"?> <myxml/> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=47137&edit=1