note 46166 deleted from function.domxml-new-doc by didou
| From: | didou@php.net | Date: | Mon, 01 Aug 2005 11:49:21 +0000 |
| Subject: | note 46166 deleted from function.domxml-new-doc by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-92861@lists.php.net to get a copy of this message | ||
Note Submitter: mazsolt at yahoo dot com
----
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 ....