Peter Sabaini wrote:
>
> hello,
>
> i am rather desperately trying to figure out how to delete a node
> object from the DOM.
>
> say i have a node $node by manually traversing the DOM tree or by an
> xpath_eval() function call. i can access the children
> ($node->children()) or the parent ($node->parent()) or add a sub-node
> ($node->new_child()) but there seems to be no $node->unlink() or
> something like that to remove $node from my DOM tree.
>
> in libxml which the php domxml extension is built upon there's a
> function xmlUnlinkNode() which seems to do just that, but there is no
> binding for this function in php (or i didn't find it. i looked in
> ext/domxml/php_domxml.c).
>
> any solutions / workarounds / patches anyone? or am i being plain
> dumb -- i am pretty a php novice so chances are i overlooked the very
> very obvious.
>
I've been playing w/ DOM XML extension for my documentation catalog
(docs.digiro.net still work in progress ;), and my first shot would be
to unset the node from the children list of its parent. I also dig for
what
methods a DomNode, DomAttribute etc. have and figured out some. I would
like
to see them documented somewhere ...
-- teodor
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]