Re: Replacing Node and ChildNodes with xml datas.
Brought to you by:
bs_php,
nigelswinson
From: Nigel S. <nig...@us...> - 2003-01-29 00:41:10
|
Attached are a couple of sources that show how to do this using the replaceChild() method. The line of interest is: // When you pass in a valid XML "string", it is parsed into a "node" // and inserted into the tree $xPath->replaceChild($aResults[0], "<a>something<b/> something else</a>"); You might also want to check out the replaceData() and replaceChildByData() Cheers Nigel =========================== For the most recent version of Php.XPath, and an archive of this list visit: http://www.sourceforge.net/projects/phpxpath |