The note above is exact :
dump_node is not a method of the DomNode class anymore but a method of DomDocument class.
Note that "$dom->dump_node($myNodeObject); " also works in PHP 4.2.
So I recommand to use it like this.
Last thing : you can't specified the encoding in the dump_node methode contrary to the dump_mem method.
So characters like '' are always converted in UTF-8.
The function below does exactly the same work as dump_node but also take in argument the encoding :
(it's not elegant but it works)
function my_dump_node($node,$encoding){
$domNode = domxml_new_doc("1.0");
$clonedNode = $node->clone_node(true);
$domNode->append_child($clonedNode);
$result = $domNode->dump_mem(true,$encoding);
$pos = strpos($result,"?>");
return substr($result,$pos+2);
}
so
$dom->dump_node($myNodeObject);
becomes
my_dump_node($myNodeObject,"ISO-8859-1");