note 28367 deleted from function.domnode-dump-node by sobak
| From: | sobak@php.net | Date: | Tue, 22 Nov 2016 03:40:18 +0000 |
| Subject: | note 28367 deleted from function.domnode-dump-node by sobak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-207395@lists.php.net to get a copy of this message | ||
Note Submitter: gk at proliberty dot com
----
The first comment above is wrong, at least, now in PHP 4.3.0
Example:
<?php
$xml=<<<eot
<node attr="test"><test>hi</test>
</node>
eot;
$doc = domxml_open_mem($xml);
$root=$doc->document_element();
//This will NOT work:
//$nodeDump =$doc->dump_node($doc);
//This works:
$nodeDump =$doc->dump_node($root);
echo htmlentities($nodeDump);
?>