A high-level comparison of XML Parser Libraries in the Lisp world to serve as a guide for picking the right tool for the job.
The following is my first-pass assessment of packages mentioned in the CL-Gardeners mailing list without actually having used any of the mentioned libraries.
| Library | Parser Targets | License | Maintained | Last Package Update | Last Review |
|---|---|---|---|---|---|
| xmls | s-expr | BSD | sort-of | 2004-09-27 | 2006-01-16 |
| s-xml | SAX, XSML, LXML, xml-element struct | LLGPL | Y | 2005-02-03 | 2006-01-16 |
| cl-xml | SAX (primitive), CLOS, s-expr | LGPL/W3C? | Y | 2003-04-09 | 2006-01-16 |
| cxml | SAX, W3C DOM Level 2 Core, xmls | LLGPL | Y | 2006-01-05 | 2006-01-16 |
| XMLisp | CLOS/MOP | LGPL | Y | 2005-02-15 | 2006-01-16 |
| Library | Validation | Namespaces | XPath | XQuery | XSL | Schemata | Encoding |
|---|---|---|---|---|---|---|---|
| xmls | N | Y | N | N | N | N | ? |
| s-xml | N | N | N | N | N | N | simple |
| cl-xml | Y | Y | Y | Y | N | N | iso-8859-1, all three UTF formats (unless Base Lisp limited) |
| cxml | Y | Y | N | N | N | Relax NG | UTF-8, UTF-16, iso-8859-n, koi8-r (UTF-8 even w/o Base Lisp Unicode) |
| XMLisp | ? | ? | ? | ? | ? | ? | ? |
| Library | Conformance | Provides Test Suite |
|---|---|---|
| xmls | passes 85/98 valid documents | ? |
| s-xml | N | N |
| cl-xml | passes 1749/1812 | Y |
| cxml | passes 1829/1829; skipped 333 | Y |
| XMLisp | ? | N |
Xmls is a small, simple, non-validating xml parser for Common Lisp. It's designed to be a self-contained, easily embedded parser that recognizes a useful subset of the XML spec. It provides a simple mapping from xml to lisp s-expressions and back.
| Author | Miles Eagan |
| Maintainer | Drew Crampsie |
| Version | 1.2 |
| Homepage | http://common-lisp.org/project/xmls |
| Download | http://common-lisp.org/project/xmls/xmls-1.2.tar.gz |
Include usage-related tidbits here...
S-XML is a simple XML parser implemented in Common Lisp. Originally it was written by Sven Van Caekenberghe. It is now being maintained by Sven Van Caekenberghe, Rudi Schlatte and Brian Mastenbrook. S-XML is used by S-XML-RPC and CL-PREVALENCE.
| Author | Sven Van Caekenberghe |
| Maintainers | Sven Van Caekenberghe, Rudi Schlatte, Brian Mastenbrook |
| Version | 1.2 |
| Homepage | http://common-lisp.org/project/s-xml |
| Download | http://common-lisp.org/project/s-xml/s-xml.tgz |
Include usage-related tidbits here...
CL-XML is a collection of Common LISP modules for data stream parsing and serialization according to the "Extensible Markup Language" and anscilliary standards. The modules perform parsing and serialization between XML, XML Query, and XML Path expressions and DOM-compatible CLOS instances. The XML processor includes a conformant, validating, namespace-aware model-based parser. It supports, in particular, namespace-aware DTD-based validation. The XPATH module comprises LISP bindings for the XML Path library, an S-expression-based namespace-aware path model, and a macro-based path model compiler which implements an XPATH-algebra. The XQUERY module comprises LISP bindings for the XML Query library, an S-expression-based query model which incorporates the XPATH facilities, and a macro-based query compiler. The base CLOS model class library implements the XML Query Data Model and presents an Infoset compatiable programming interface.
| Author | James Anderson |
| Maintainer | James Anderson |
| Version | 0.949 |
| Homepage | http://pws.prserv.net/James.Anderson/XML/ |
| Download | http://pws.prserv.net/James.Anderson/XML/documentation/releases.html |
| Howtos | http://pws.prserv.net/James.Anderson/XML/documentation/howto/index.html |
Include usage-related tidbits here...
An XML parser written in Common Lisp.
CXML implements a namespace-aware, validating SAX-like XML 1.0 parser as well as the DOM Level 2 Core interfaces.
CXML is licensed under Lisp-LGPL.
| Author | Gilbert Baumann |
| Maintainer | David Lichteblau |
| Version | 2006-01-05 |
| Homepage | http://common-lisp.org/project/cxml/ |
| Download | http://common-lisp.org/project/cxml/download/ |
Include usage-related tidbits here...
XMLisp is the integration of Lisp with XML. The Lisp Meta Object Protocol is used to establish a simple and highly efficient mapping between CLOS objects and the XML extensible markup language. It is not just an API to read XML files and turn them into some Lisp flavored representation. Instead, it integrates Lisp and XML into one environment at two levels. At a language level it allows the arbitrary combination of Lisp expressions and XML elements. CLOS objects can be printed as XML elements. XML elements evaluate into CLOS objects. At a tool level XMLisp allows users to fluidly experiment with XML. Type XML elements into the lisp listener. Evaluate complete or parts of hierarchical XML elements. Inspect complex XML elements using the inspector. Get support from symbol completion when editing XML.
| Author | Alexander Repenning |
| Maintainer | Alexander Repenning |
| Version | 2.3 |
| Homepage | http://www.agentsheets.com/lisp/XMLisp/ |
| Download | http://www.agentsheets.com/lisp/XMLisp/XMLisp.zip |
Include usage-related tidbits here...