Perl
New releases: XML::SAX and XML::LibXML
12:12, 16 Nov 2001 UTC | Michael Smith

Matt Sergeant has announced the initial release of XML::SAX, a Perl module that provides a transparent interface to multiple SAX2 parsers (similar to the way the DBI module provides a consistent interface to multiple databases). He's also released version 1.30 of XML::LibXML, a module that provides an interface to the SAX, DOM and XPath capabilities in Daniel Veillard's Libxml2 (the XML C library for Gnome).

The XML::SAX module enables an application to access a registry of all locally installed parsers, specify required parser features, and then use any parser on the system that has those required features and that complies with the Perl SAX2 spec -- for example, XML::LibXML or XML::SAX::PurePerl (which is included as a "fallback" parser in the XML::SAX distribution).

The XML::LibXML module gives developers access to the up-to-date, standards-compliant features of Libxml2. Developers who are still exclusively using XML::Parser (the Perl interface to James Clark's expat XML library) will probably want to read up on why they might want to use XML::LibXML in at least some cases [1].

Discussion of XML::SAX and XML::LibXML (and just about everything else having to do with Perl and XML) takes place on the Perl-XML mailing list.



[1] The main reasons are that Clark developed expat before the DOM, SAX, and XPath became standards, so expat doesn't implement any of those. Libxml2 was developed very recently, so it implements them all (along with XInclude and XPointer and XML Catalogs...). And a consequence of lack of DOM or SAX support in expat is that when XML applications that rely on expat need to process a document, the document has to be serialized as a string (instead being represented as an in-memory tree) then reparsed each time the application does anything new with it.

| See 1 comment

Newest comments

Re: New releases: XML::SAX and XML::LibXML (Adam Trickett - 12:33, 16 May 2002)
Since this announcment XML::LibXML has moved on quite a bit to version 1.49 and XML::SAX has also mo ...
  
xmlhack: developer news from the XML community

Front page | Search | Find XML jobs

Related categories
Perl
Tools