Available Perl XML Modules
Tree Processing Modules
Tree processing modules are modules which load
a document (or part of one) into memory and allow access to the elements,
attributes, sometimes the DTD, etc. They usually also facilitate the outputting
of the document in XML.
Some examples of Tree Processing Modules (based
on XML::Parser) are:
- XML::DOM is a Perl implementation of the W3C's DOM Level 1, plus some
- It is one of the most widely used Perl XML modules, and the de facto
standard for XML transformation with Perl.
- XML::DOM is based on XML::Parser, and offers a SAX interface.
- It is distributed as part of the libxml-enno bundle.
- Being widely used, it is probably one of the most robust XML modules.
- XML::Simple was first written to allow easy loading and updating of
configuration files written in XML.
- It can be used to process other kinds of simple XML documents.
- One limitation of XML::Simple is that it does not grok mixed content
- Good module to use for configuration files, since it has a very straightforward
- XML::Twig offers another tree-oriented interface to XML documents.
- It allows loading of only parts of the document in order to keep memory
requirements to a minimum.
- If your documents are too big to fit in memory, but you still want tree
access to parts of the document, then consider using XML::Twig.
- My personal favorite (at this point in time)!
- XML::Twig is based on XML::Parser
- XML::Grove loads an XML document in memory and creates a tree of Perl
objects that can be accessed and manipulated.
- It's interface is more perlish than the DOM one, including the capability
for creating visitor classes on a Grove.
- XML::Grove can also be used on SGML and HTML documents.