in reply to XML::XPath adding new nodes

I don't think you are using the right tool here. XML::XPath is most useful for finding things, not necessarily adding things. One solution is to pair XML::Parser and XML::Writer, you can distill more of this solution over at XML Search and Replace. Another thought is to use XML::Twig (i am starting to think of this module as the Swiss-Army chainsaw of XML processing). Yet another solution is to use XML Shell. This will be most helpful for when you need to edit complex XML for one-time, on the fly tasks. Good luck. :)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)
  • Comment on (jeffa) Re: XML::XPath adding new nodes

Replies are listed 'Best First'.
Re: (jeffa) Re: XML::XPath adding new nodes
by purge (Acolyte) on Mar 04, 2003 at 14:44 UTC
    Thanks Jeffa,

    I've dumped XML::XPath in this case anyway for XML::LibXML which is both faster and seems more logical. Its not for everybody mind as its based on libxml2, but suits my server requirements fine.
    Thanks for the link, it looks like it could be helpful.

    Simon.
      I took a look at XML::Twig, played with it a bit and voila.
      XML::Twig really is the dogs...