http://qs321.pair.com?node_id=784007


in reply to replaceChild in LibXML

getElementsByTagNameNS gets element nodes (as opposed to text nodes). Try using findnodes, for example:
$results->findnodes("//wrap/text()");
This way you will replace a text node with another text node.