[PHP] How can I DomDocument->renameNode?

2007-06-01 Thread Eric Wiener
Apparently renameNode is not yet implemented into Dom, so how can I rename a node without affecting its value and/or child nodes? I have tried making a new node, inserting it before the old node then removing the old node but I could not figure out how to get the nodeValue to include the child

[PHP] Re: How can I DomDocument->renameNode?

2007-06-05 Thread Eric Wiener
Thanks for the reply, but the solution needs to be in PHP, not JavaScript. -Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: Sunday, June 03, 2007 3:20 PM To: php-general@lists.php.net Subject: [PHP] Re: How can I DomDocument->renameNode? >I have tried making a new node, ins

[PHP] How to clone an entire XML node including childnodes?

2007-06-05 Thread Eric Wiener
Basically I am trying to turn something like this: Hello Joe, nice to meet you into this: Hello Joe, nice to meet you by making a new node, inserting before the old node and then removing the old node. The problem is that I am populating the value of the new node with the $oldNo

[PHP] Dom appendChild strips trailing text from within a node

2007-06-13 Thread Eric Wiener
I am trying to modify a node name and it mostly works, except that appendChild seems to strip the text that FOLLOWS after a subnode. Leading text and subnodes appear to be retained perfectly, just not text trailing the subnode. I tried using cloneNode, but that discarded the children even when I se