in reply to preferred XPath library in perl

I installed XML::XPath using ppm for ActiveState and it worked out of the box with a little test program. I pretty sure I don't have libxml in my path or else. Does XML::LibXML work without any binary files or are they already integrated in perl.exe or did I just misunderstand something?

Replies are listed 'Best First'.
Re^2: preferred XPath library in perl
by Sinistral (Monsignor) on Aug 05, 2010 at 12:25 UTC

    I found a Stack Overflow question regarding adding XML::LibXML to an ActiveState distribution. It still requires the binary portions, but 3rd parties have made distributions and let you use the ActiveState ppm utility to get it installed.

    As to your original question about the utility of XML::XPath, it's not bad with relatively simple XML. It doesn't handle name spaces, and if your XML gets very large the memory usage and processing time is going to explode. For a project I was working on, I remember having to modify the code of XML::XPath a little to fix a bug in retrieving attribute values. It isn't actively maintained and you'll eventually outstrip its capabilities. If you don't want to bother with XML::LibXML, you could also try XML::Twig which has XPath capabilities.