XML::XPath delete function

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.
odhiseo [ Mo, 26 November 2007 21:35 ] [ ID #1879390 ]

Re: XML::XPath delete function

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
mirod [ Di, 27 November 2007 12:55 ] [ ID #1880279 ]

Re: XML::XPath delete function

On 27 nov, 05:55, mirod <mi... [at] xmltwig.com> 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.
odhiseo [ Mi, 28 November 2007 20:51 ] [ ID #1881130 ]
Perl » comp.lang.perl.modules » XML::XPath delete function

Vorheriges Thema: Side effects of overloading quotes ""
Nächstes Thema: XML::LibXML::Common does not install Common.pm