domxml: getting a node's XML (using xmlDumpNode)
| From: | Thomas Gagne | Date: | Tue, 22 Jan 2002 02:39:13 +0000 |
| Subject: | domxml: getting a node's XML (using xmlDumpNode) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-81476@lists.php.net to get a copy of this message | ||
Sure, documents can call dumpmem(), but there's no way to get the XML of a
node.
Until now!
Not knowing at all what I was doing, I copied code from the function
unlink_node and modified it to call xmlDumpNode(). It works for me, though I
expect there's probably a memory leak in it since I don't know (right now) the
proper way to deallocate an xmlBufferPtr.
To make it work, you need to edit php_domxml.c and insert a suitably modified
line everywhere you see a reference to unlink_node.
--
.tom