[Omaha.pm] Suggested XML modules... (2011)

Christopher Cashell topher-pm at zyp.org
Tue Jun 7 12:37:00 PDT 2011


2011/6/7 Dan Linder <dan at linder.org>
>
> Is there a more current page or discussion about Perl XML modules?  I'm not
> opposed to using XPath (though the Perl Wiki warns against it because it
> appears to be no longer maintained), but if I come across a show-stopping
> bug, I don't want to invest a lot of coding time if the module doesn't have
> an active or responsive development record.
>

I don't know of a better page for Perl XML info, but I can offer a bit of
info on XML::XPath and the suggested replacement.

XML::XPath is a pure-Perl implementation.  I usually grab it for quick and
dirty stuff because it's easily fast enough for my needs, and doesn't
require external dependencies.  If you want something similar that is more
actively maintained, I'd suggest looking at XML::LibXML.  It uses the GNOME
libxml library to do the heavy lifting, and it also provides a similar xpath
interface.  In my experience, for small XML::XPath projects, porting form
XML::XPath to XML::LibXML probably wouldn't take much effort[0].  Matt
Seargent, the guy behind XML::XPath, was also the (or one of the) initial
guys behind XML::LibXML, so the xpath part looks pretty similar between
them.

Most distributions have packages for XML::LibXML, but if you're
pulling/building it from cpan, you'll need both libxml and its dev/devel
package with headers and such.

Dan
>

[0] Take my experience here with a grain of salt.  The code I was converting
totaled less than 200 lines, and the XML related stuff was only a few dozen
lines or so of the code.

-- 
Christopher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/omaha-pm/attachments/20110607/96ea7cee/attachment.html>


More information about the Omaha-pm mailing list