3 A data structure for well-formed XML documents, designed for Common
10 cxml-stp is an alternative to the
11 W3C's <a href="http://common-lisp.net/project/cxml/dom.html">DOM</a>,
12 which cxml also implements. It was written
13 by <a href="mailto:david@lichteblau.com">David Lichteblau</a> as an
15 <a href="http://common-lisp.net/project/cxml">Closure XML</a> and is
16 available under an X11-style license.
19 Please send bug reports
20 to <a href="mailto:cxml-devel@common-lisp.net">
21 cxml-devel@common-lisp.net</a>
22 (<a href="http://common-lisp.net/cgi-bin/mailman/listinfo/cxml-devel">list information</a>).
25 <i>Acknowledgements:</i>
26 cxml-stp is inspired by <a href="http://www.xom.nu/">XOM</a>.
31 <a href="http://www.lichteblau.com/cxml-stp/download/">tarball</a>.
37 <a href="http://common-lisp.net/project/cxml">Closure XML</a>
38 and <a href="http://common-lisp.net/project/alexandria/">Alexandria</a>.
39 <a href="http://www.cliki.net/asdf">ASDF</a> is used for
40 compilation. Register the .asd file, e.g. by symlinking it,
41 then compile cxml-stp using <tt>asdf:operate</tt>.
43 <pre>$ ln -sf `pwd`/cxml-stp.asd /path/to/your/registry/
44 * (asdf:operate 'asdf:load-op :cxml-stp)</pre>
46 <i>Implementation-specific notes:</i>
47 At this point, cxml-stp is written to work with Lisp strings
48 (as opposed to runes and rods), and is meant to be used on
49 Lisp implementations with Unicode support.
52 <h3>Documentation</h3>
54 <raute/> <a href="tutorial/index.html">Tutorial</a>
57 <raute/> <a href="tutorial/examples.html">Code</a> snippets
58 from the tutorial collected on one page
61 <raute/> <a href="doc/pages/cxml-stp.html">API documentation</a>
64 There is also a rough "STP for DOM
65 users" <a href="DOM-COMPARISON">comparison</a> which should be
66 useful if you have a specific DOM function in mind and are looking
73 To parse into STP, use an STP builder together with a function
74 generating SAX events:
76 <pre class="code">(defparameter *example*
77 (cxml:parse-file "example.xml" (<a
78 href="doc/pages/cxml-stp__make-builder.html">cxml-stp:make-builder</a>)))</pre>
80 Serialize STP by sending SAX events for the tree to a sink:
83 href="doc/pages/cxml-stp__serialize.html">cxml-stp:serialize</a> *example* (cxml:make-character-stream-sink *standard-output*))</pre>