Home > Archive > PERL Modules > November 2007 > XML::XPath delete function
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
XML::XPath delete function
|
|
| odhiseo 2007-11-26, 7:00 pm |
| 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 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
| |
| odhiseo 2007-11-28, 7:00 pm |
| On 27 nov, 05:55, mirod <mi...@xmltwig.com> wrote:
> odhiseo wrote:
>
> 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.
|
|
|
|
|