Current version is 0.07    
libxml-perl is a collection of Perl modules, scripts, and documents for working with XML in Perl. libxml-perl software works in combination with XML::Parser, PerlSAX, XML::DOM, XML::Grove, and others.

Questions about how to use this library should be directed to the comp.lang.perl.modules USENET Newsgroup. Bug reports and suggestions for improvements can be sent to the <> mailing list. This mailing list is also the place for general discussions and development of the libxml-perl package.

To join the Perl-XML mailing list, send an email message to with the following text in the body:

    Subscribe Perl-XML

libxml-perl source is available on CPAN in the XML module directory. This link goes through the CPAN redirector so if the site gives you any problems, just click it again and you will be redirected to a different site.

libxml-perl source is also available here.

The libxml-perl-0.07 README

The following modules are part of libxml-perl. Below they are marked with their release status:

    STABLEhas been in use for a while with few or no outstanding bugs
    BETAinterfaces are stable but there may still be bugs
    ALPHAinterfaces are changing, there may be lots of bugs, and there may not be docs available yet
XML::Parser::PerlSAX is a PerlSAX parser using XML::Parser (which uses James Clark's Expat XML Parser).

A PerlSAX handler for writing readable XML (in contrast to Canonical XML, for example). XMLWriter is also subclassable and supports calling start and end methods by element-names (subclassed from XML::Handler::Subs). XMLWriter is similar to XML::Parser's Stream style.

A PerlSAX handler base class that calls start and end methods by element-names. Subs is similar to XML::Parser's Subs style.

XML::Handler::CanonXMLWriter is a PerlSAX handler that outputs in Canonical XML.

XML::Handler::Sample is a PerlSAX handler that simply prints out the event names as they are parsed by a PerlSAX parser. It can be used for debugging or as a template for building new handlers. XML::Handler::Sample contains handlers for all known parser events.

XML::ESISParser is a validating PerlSAX parser using James Clark's `nsgmls' SGML/XML Parser. ESISParser supports both XML and SGML document instances. Unless you need validation, you should probably be using XML::Parser::PerlSAX or XML::Parser.

XML::ESISParser with XML::Grove obsolete the SGML::SPGroveBuilder and SGML::Grove modules.

Data::Grove, Data::Grove::Parent, Data::Grove::Visitor
Data::Grove and it's helpers provide a base class for deeply nested or directed graph structures. Used by XML::Grove (and others soon).

XML::SAX2Perl, XML::Perl2SAX
SAX2Perl and Perl2SAX are SAX Parser<->DocumentHandler filters. These modules translate parse events between the Java/CORBA style SAX methods and PerlSAX style methods.

The following modules will very likely be renamed in the next release. XML::PatAct::MatchName
MatchName is a pattern matching module that can be used with PatAct action modules. MatchName uses simple element names or element name lists to match names to actions.

ToObjects is a PatAct action module. ToObjects can be used to create application-ready Perl objects from XML instances.

Amsterdam is a PatAct action module. Amsterdam can be used to apply a very simple form of style-sheet to an XML instance by using ``before'' and ``after'' strings that are output before and after the contents of elements.

XML::PatAct::PatternTempl, XML::PatAct::ActionTempl
PatternTempl and ActionTempl are template files that pattern/action module writers can copy to create new modules. See Creating PatAct Modules for more information.

This document defines a Perl binding to SAX 1.0. PerlSAX-based parser modules implement and possibly extend the interface described in PerlSAX.

Using PerlSAX
UsingPerlSAX is a brief introduction to PerlSAX using the XML::Parser::PerlSAX module.

Using PatAct Modules
Describes how to use pattern/action modules to transform XML instances.

Creating PatAct Modules
A document for module writers who are writing new pattern/ action modules.

modules.xml contains a listing of all Perl XML packages and their public modules categorized by several topics.

February 22, 2000
-doc/index.html: libxml-perl site index
-doc/ creates a libxml-perl mirror site
-all modules: release script didn't insert version numbers in Perl modules. Reported by Enno Derksen
-doc/modules.xml: well-formedness errors. Reported by KangChan Lee

February 4, 2000
-all modules: add $VERSION. Suggested by Michael Koehne
-XML::Parser::PerlSAX: add UseAttributeOrder option and AttributeOrder and Defaulted properties to start_element() handler. Suggested by Enno Derksen
-XML::Parser::PerlSAX: add start_cdata, end_cdata, and entity_reference events
-XML::PatAct::Amsterdam: added Output and AsString options, added support for replacing attributes
-Data::Grove: add a Data::Grove::Characters class to act as a default grove object for containing characters.
-XML::PatAct::ToObjects: removed leftover debugging statement
-XML::ESISParser: report record end as characters if no record_end() handler
-XML::Parser::PerlSAX: For attribute list declarations, now correctly calls the attlist_decl() method and passes the ElementName property, it used to call entity_decl() passing EntityName. Reported by Enno Derksen and Colin Muller

August 16, 1999
-Major update to PerlSAX specification
-Added an introduction
-Added a ``Deviations from the Java version'' section
-Re-added the `set_document_locator()' handler method
-Added arguments to method synopses
-Attributed most of the content to the SAX 1.0 JavaDoc
-Minor typos
-XML::Handler::XMLWriter: a new PerlSAX handler for writing readable XML (in contrast to Canonical XML)
-XML::Handler::Subs: a new PerlSAX handler base class for calling user-defined subs
-XML::PatAct::ToObjects: add CopyAttributes option, add -grove-contents action
-All PatAct modules can now take parameters as either a list of key, value pairs or a hash
-XML::ESISParser wasn't testing handlers for what methods they support
-XML::Parser::PerlSAX wasn't forwarding XML::Parser Element events

August 11, 1999
-Added pattern/action modules for name matching, converting to objects, and applying simple styles -- XML::PatAct::MatchName, XML::PatAct::ToObjects, and XML::PatAct::Amsterdam.
-Added ``Using PatAct Modules'' and ``Creating PatActModules'' docs.
-XML::Parser::PerlSAX and XML::ESISParser were not passing a hash for `start_document()' and `end_document()' per spec.

May 26, 1999
-added XML::Handler::CanonXMLWriter and test

May 24, 1999
-renamed package from `libxml' to `libxml-perl'
-added doc/modules.xml
-added doc/UsingPerlSAX.pod and example files
-moved PerlSAX.pod and interface-style.pod to `doc/'
-renamed Data::Grove::Tied to Data::Grove::Parent

The following have shared their code, documents, comments, and/or suggestions for libxml-perl:

Eduard (Enno) Derksen
Michael Koehne
KangChan Lee
Ken MacLeod
Colin Muller
Eric Prud'hommeaux
Larry Wall