XML::XPath delete function
am 26.11.2007 21:35:27 von odhiseo
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
am 27.11.2007 12:55:20 von mirod
odhiseo wrote:
> 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?.
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.
--
mirod
Re: XML::XPath delete function
am 28.11.2007 20:51:15 von odhiseo
On 27 nov, 05:55, mirod wrote:
> odhiseo wrote:
> > 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?.
>
> 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.
>
> --
> mirod
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.