xml-to-sexp1
Convert xml to symbolic expressions
Usage
xml-to-sexp
Overview
xml-to-sexp reads from stdin and output to stdout.
Notes
This program uses the expat parser library by James Clark, which comes dual-licenced under the MPL/GPL. This wrapper for expat parses standard input and outputs a simple, lisp-readable representation of the file, with the following features:
- Translates UTF-8 to ISO Latin-1, so that the resulting output can be
used as-is with normal 8bit Unix lisps. Stuff outside of ISO
Latin-1 is silently elided (can easily be changed to dump core
instead ;).
- PCDATA is mapped to CL strings, where as many PCDATA segments as
possible are merged into one string.
- Elements are mapped to lists, with the first item being the start
tag, which is mapped to a nested list, i.e.
<element attr="value">...</element>
is mapped to
(("element" "attr" "value") ...)
- Processing Instructions (PIs) are mapped to a single cons, i.e.
<?foo ...?> is mapped to ("foo" . "...")
Releases
3 releases since Debian 3.1 (Sarge); the text changed 1 time.