note 44322 deleted from ref.dom by didou

From: Date: Tue, 04 Jan 2005 10:12:26 +0000
Subject: note 44322 deleted from ref.dom by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-82678@lists.php.net to get a copy of this message
Note Submitter: zombie(at)localm(dot)org ---- 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

« previous php.notes (#82678) next »