note 44322 added to ref.dom

From: Date: Wed, 21 Jul 2004 02:11:23 +0000
Subject: note 44322 added to ref.dom
Groups: php.notes 
Request: Send a blank email to php-notes+get-73778@lists.php.net to get a copy of this message
Here is just a quick note for people migrating to PHP5 dom functions from PHP4 domxml functions. Here is a really quick snippet of doing the "same ol' stuff". -- $doc = new DOMDocument; $doc->loadXML($some_xml_string); $root_node = $doc->documentElement; $root_xml_string = $doc->saveXML($root_node); -- Basically, we just create a dom document of a string of XML. Then we gank the root node and dump it out as a string. Notice, dom_xml_open_mem is deprecated as stated above. The replacement is DomDocument::loadXML(string) Also, domdocument->document_element() is no longer. It is now a member variable- documentElement. This is not in the documentation here that i could see. Finally, no more domdocument->dump_node(domnode); DomDocument::saveXML(DomElement) is the new replacement. Hope that helps someone some time. Blaine Garrett http://artattack.to/?zombie ---- Manual Page -- http://www.php.net/manual/en/ref.dom.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+44322 Delete -- http://master.php.net/manage/user-notes.php?action=delete+44322&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+44322&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#73778) next »