CL-XML is an XML parser.


License: ?

Various informative statements about it from the homepage and the CL-XML documentation:

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 implements the XML Query Data Model in a class hierarchy which presents an Infoset compatible programming interface.

The respective releases have been tested with

  • ALLEGRO(5.0.1, 6.2) - CL-HTTP
  • LispWorks(4, 4.3) - CL-HTTP
  • MCL(4.2, 5.0) +/- CL-HTTP(cl-http-70-190)
  • openmcl
  • cmucl (latest test was with p.mai's osx port)
  • scieneer

But it is reported to not work on SBCL (see below)

CL-XML supports both DOM-based parsing and Event-based parsing. For the latter method, two event-based interfaces are provided -- one, on a lower level, and another, as a SAX equivalent. The DOM-based (i.e.: model-based) method is the default. DOM-based and Event-based methods may be used together, in the same application.

The XML, XPath, and XQuery parsers are generated from BNF files, which are available at the main CL-XML page

CL-XML, version 0.915, also includes a contributed SOAP module

SBCL Note: I was able to get the library working with SBCL, ASDF, and common-lisp-controller on my Gentoo box. (brad at sankatygroup dot com).
To pull the library with my changes (which are questionable on other Lisp implementations), use your favorite Subversion client and do:

svn co svn:// /path/to/local/working/copy