Edit report at http://bugs.php.net/bug.php?id=47137&edit=1

 ID:               47137
 Comment by:       jpatokal at iki dot fi
 Reported by:      romain dot lalaut at laposte dot net
 Summary:          LIBXML_NOXMLDECL is not working anymore
 Status:           Bogus
 Type:             Bug
 Package:          XML related
 Operating System: Linux
 PHP Version:      5.3.0alpha3

 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------
[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 http://bugs.php.net/bug.php?id=47137&edit=1

Reply via email to