|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-06-19 18:41 UTC] requinix@php.net
-Status: Open
+Status: Feedback
[2014-06-19 18:41 UTC] requinix@php.net
[2014-06-20 07:29 UTC] info at gmwconsult dot nl
-Status: Feedback
+Status: Closed
[2014-06-20 07:29 UTC] info at gmwconsult dot nl
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 03:00:01 2025 UTC |
Description: ------------ if I load a snippet of html with loadXML() and subsequently echo the contents, the first empty node is filled with the next node. This does not happen if the first node contains   or another empty node. So the result will be: <div> <nav id="filter" > <section id="portfolio_container"> <ul id="stage"> </ul> </section> </nav> </div> php 5.4.19 that comes with xampp running on windows Test script: --------------- $html = '<div> <nav id="filter" /> <section id="portfolio_container"> <ul id="stage"> </ul> </section> </div>'; $doc = new DOMDocument('1.0','utf8'); $doc->loadXML($html); echo"<pre>"; print_r($doc->saveXML()); echo"</pre>"; die();