new function cxml:parse
This commit is contained in:
58
doc/sax.xml
58
doc/sax.xml
@ -43,17 +43,63 @@
|
||||
</p>
|
||||
|
||||
<h3>Parsing and Validating</h3>
|
||||
<div style="border: 1px dotted black;
|
||||
width: 70%;
|
||||
padding: 1em">
|
||||
<p>
|
||||
<div class="def">Function CXML:PARSE-FILE (pathname handler &key ...)</div>
|
||||
<div class="def">Function CXML:PARSE-STREAM (stream handler &key ...)</div>
|
||||
<div class="def">Function CXML:PARSE-OCTETS (octets handler &key ...)</div>
|
||||
<div class="def">Function CXML:PARSE-ROD (rod handler &key ...)</div>
|
||||
Parse an XML document. 
|
||||
Old-style convenience functions:
|
||||
</p>
|
||||
<div style="font-weight: bold">Function CXML:PARSE-FILE (pathname handler &key ...)</div>
|
||||
<p style="margin-left: 2em">Same as <tt>cxml:parse</tt> with a pathname argument.
|
||||
(But note that <tt>cxml:parse-file</tt> interprets string
|
||||
arguments as namestrings, while <tt>cxml:parse</tt> expects
|
||||
literal XML documents.)
|
||||
</p>
|
||||
<div style="font-weight: bold">Function CXML:PARSE-STREAM (stream handler &key ...)</div>
|
||||
<p style="margin-left: 2em">Same as <tt>cxml:parse</tt> with a stream argument.</p>
|
||||
<div style="font-weight: bold">Function CXML:PARSE-OCTETS (octets handler &key ...)</div>
|
||||
<p style="margin-left: 2em">Same as <tt>cxml:parse</tt> with an octet vector argument.</p>
|
||||
<div style="font-weight: bold">Function CXML:PARSE-ROD (rod handler &key ...)</div>
|
||||
<p style="margin-left: 2em">Same as <tt>cxml:parse</tt> with a string argument.</p>
|
||||
</div>
|
||||
|
||||
<h4>
|
||||
New all-in-one parser interface:
|
||||
</h4>
|
||||
<div class="def">Function CXML:PARSE (input handler &key ...)</div>
|
||||
<p>
|
||||
Parse an XML document, where input is a string, pathname, octet
|
||||
vector, or stream.
|
||||
Return values from this function depend on the SAX handler used.<br/>
|
||||
Arguments:
|
||||
</p>
|
||||
<ul>
|
||||
<li><tt>pathname</tt> -- a Common Lisp pathname</li>
|
||||
<li>
|
||||
<tt>input</tt> -- one of:<br/>
|
||||
<ul>
|
||||
<li>
|
||||
<tt>pathname</tt> -- a Common Lisp pathname.
|
||||
Open the file specified by the pathname and create a source for
|
||||
the resulting stream. See below for information on how to
|
||||
close the stream.
|
||||
</li>
|
||||
<li><tt>stream</tt> -- a Common Lisp stream with element-type
|
||||
<tt>(unsigned-byte 8)</tt>. See below for information on how to
|
||||
close the stream.
|
||||
</li>
|
||||
<li>
|
||||
<tt>octets</tt> -- an <tt>(unsigned-byte 8)</tt> array.
|
||||
The array is parsed directly, and interpreted according to the
|
||||
encoding it specifies.
|
||||
</li>
|
||||
<li>
|
||||
<tt>string</tt>/<tt>rod</tt> -- a rod (or <tt>string</tt> on
|
||||
unicode-capable implementations).
|
||||
Parses an XML document from the input string that has already
|
||||
undergone external-format decoding.
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><tt>stream</tt> -- a Common Lisp stream with element-type
|
||||
<tt>(unsigned-byte 8)</tt></li>
|
||||
<li><tt>octets</tt> -- an <tt>(unsigned-byte 8)</tt> array</li>
|
||||
|
||||
Reference in New Issue
Block a user