Update of /project/cxml/cvsroot/cxml/doc In directory clnet:/tmp/cvs-serv7372/doc
Modified Files: quickstart.html Log Message: klacks documentation
--- /project/cxml/cvsroot/cxml/doc/quickstart.html 2006/01/23 21:53:24 1.7 +++ /project/cxml/cvsroot/cxml/doc/quickstart.html 2007/02/18 11:07:39 1.8 @@ -94,5 +94,22 @@ structure (<a href="xmls-compat.html">read more</a>):</p> <pre>* <b>(cxml:parse-file "example.xml" (cxml-xmls:make-xmls-builder))</b> ("test" (("a" "b")) ("child" NIL))</pre> + + <p>Use klacks to read events from the parser incrementally. The + following example looks only for :start-element and :end-element + events and prints them (<a href="klacks.html">read more</a>):</p> + <pre>* <b>(klacks:with-open-source + (s (cxml:make-source #p"example.xml")) + (loop + for key = (klacks:peek s) + while key + do + (case key + (:start-element + (format t "~A {" (klacks:current-qname s))) + (:end-element + (format t "}"))) + (klacks:consume s)))</b> +test {child {}}</pre> </body> </html>