note 46166 added to function.domxml-new-doc

From: Date: Fri, 01 Oct 2004 09:22:18 +0000
Subject: note 46166 added to function.domxml-new-doc
Groups: php.notes 
Request: Send a blank email to php-notes+get-77670@lists.php.net to get a copy of this message
I'm not sure, that Php generates an error using domxml_new_doc(), if the xml is not well-formed: $doc = domxml_new_doc("1.0"); $root = $doc->create_element("HTML"); $root2 = $doc->create_element("CSS"); $root = $doc->append_child($root); $root2 = $doc->append_child($root2); echo htmlentities($doc->dump_mem()); I added 2 roots to the xml document, and it displays: <?xml version="1.0"?> <HTML/> <CSS/> the error would come, if I tried to put the previous result in an xml dom: ..... $s = $doc->dump_mem(); $dom = domxml_open_mem($s); I get: Warning: domxml_open_mem(): Extra content at the end of the document .... ---- Manual Page -- http://www.php.net/manual/en/function.domxml-new-doc.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+46166 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46166&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+46166&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#77670) next »