ELEMENT
[cxml-stp.git] / index.xml
blob8b23cb54f2637ac950ee3391d38847c156d6d10d
1 <page>
2   <p>
3     A data structure for well-formed XML documents, designed for Common
4     Lisp.
5   </p>
7   <h3>About</h3>
9   <p>
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
14     add-on library for
15     <a href="http://common-lisp.net/project/cxml">Closure XML</a> and is
16     available under an X11-style license.
17   </p>
18   <p>
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>).
23   </p>
24   <p>
25     <i>Acknowledgements:</i>
26     cxml-stp is inspired heavily by <a href="http://www.xom.nu/">XOM</a>.
27   </p>
28   <h3>Download and Installation</h3>
30   <p>
31     Download a cxml-stp
32     <a href="http://www.lichteblau.com/cxml-stp/download/">tarball</a>.
33     cxml-stp needs
34     <a href="http://common-lisp.net/project/cxml">Closure XML</a>
35     and <a href="http://common-lisp.net/project/alexandria/">Alexandria</a>.
36     <a href="http://www.cliki.net/asdf">ASDF</a> is used for
37     compilation.  Register the .asd file, e.g. by symlinking it,
38     then compile cxml-stp using <tt>asdf:operate</tt>.
39   </p>
40   <pre>$ ln -sf `pwd`/cxml-stp.asd /path/to/your/registry/
41 * (asdf:operate 'asdf:load-op :cxml-stp)</pre>
42   <p>
43     <i>Implementation-specific notes:</i>
44     At this point, cxml-stp is written to work with Lisp strings
45     (as opposed to runes and rods), and is meant to be used on
46     Lisp implementations with Unicode support.
47   </p>
49   <h3>Documentation</h3>
50   <p>
51     Please refer to the <a href="doc/index.html">API documentation</a>
52     for details.
53   </p>
55   <h3>Example</h3>
56   <p>
57     To parse into STP, use an STP builder together with a function
58     generating SAX events:
59   </p>
60   <pre class="code">(defparameter *example*
61     (cxml:parse-file "example.xml" (<a
62     href="doc/pages/cxml-stp__make-stp-builder.html">cxml-stp:make-stp-builder</a>)))</pre>
63   <p>
64     Serialize STP by sending SAX events for the tree to a serialization sink:
65   </p>
66   <pre class="code">(<a
67     href="doc/pages/cxml-stp__unparse.html">cxml-stp:unparse</a> *example* (cxml:make-character-stream-sink *standard-output*))</pre>
68 </page>