XML::XPath delete function

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi, I have to delete a node from a XML document, I am using
XML::XPath, but I haven't found a function that do that. Do this
function exist in that module?, if not how can I do that?.

Thank you.

Re: XML::XPath delete function

odhiseo wrote:
Quoted text here. Click to load it

There is a removeChild method in XML::XPath::Node::Element.pm that
should do what you want.

I am not sure at this point that it is very wise to use XML::XPath
though. The module has not been maintained in a long time (close to 5
years) and there are a number of open bug reports (some with patches
that have not been applied in 2 years).

XML::LibXML is most likely a better choice, if you can install libxml2,
and is very, very similar to XML::XPath, except faster, much more
powerful and actively maintained.


Re: XML::XPath delete function

Quoted text here. Click to load it

Ok, thank you very much, I will try XML::LibXML as you say. I was
using XML::XPath, only because it is the first module for XPath in the
Perl & XML book.

Site Timeline