note 128713 added to libxml.constants

From: Date: Fri, 07 Jul 2023 10:53:42 +0000
Subject: note 128713 added to libxml.constants
Groups: php.notes 
Request: Send a blank email to php-notes+get-220674@lists.php.net to get a copy of this message
If you want to save without the XML declaration, and LIBXML_NOXMLDECL doesn't work for you, you can just do this: <?php $doc = new \DOMDocument('1.0', 'UTF-8'); $doc->loadXML($xml, LIBXML_*); echo $doc->saveXML($doc->firstElementChild); ?> This will output the XML without the XML declaration and without using the flag. You also don't need to do fiddly replacements and pray that it works. ---- Server IP: 45.112.84.4 Probable Submitter: 45.91.159.168 (proxied: 95.95.125.65) ---- Manual Page -- https://php.net/manual/en/libxml.constants.php Edit -- https://main.php.net/note/edit/128713 Del: integrated -- https://main.php.net/note/delete/128713/integrated Del: useless -- https://main.php.net/note/delete/128713/useless Del: bad code -- https://main.php.net/note/delete/128713/bad+code Del: spam -- https://main.php.net/note/delete/128713/spam Del: non-english -- https://main.php.net/note/delete/128713/non-english Del: in docs -- https://main.php.net/note/delete/128713/in+docs Del: other reasons-- https://main.php.net/note/delete/128713 Reject -- https://main.php.net/note/reject/128713 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#220674) next »