From e9a3aad34261a09a4299b3aac1dde888862b6750 Mon Sep 17 00:00:00 2001 From: Tom Faulhaber Date: Tue, 21 Jul 2009 23:07:29 -0700 Subject: Added the first (provisional) stab at real content --- lazy-xml-api.html | 160 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 lazy-xml-api.html (limited to 'lazy-xml-api.html') diff --git a/lazy-xml-api.html b/lazy-xml-api.html new file mode 100644 index 00000000..a7486e5c --- /dev/null +++ b/lazy-xml-api.html @@ -0,0 +1,160 @@ + + + clojure contrib - lazy-xml API reference + + + + + + + + + + + + + +
+ + +
+
+
+
+
+ +
+ NOTE: These autogen pages are still under development. + Not all links work. Not all formatting in done. + Contact Tom Faulhaber (tomfaulhaber on github, gmail, etc.) + with any questions. +
+ +

API for lazy-xml

+by Chris Houser
+
Usage: +
+(ns your-namespace
+  (:require clojure.contrib.lazy-xml))
+
+

Overview

+
Functions to parse xml lazily and emit back to text.
+
+

Public Variables and Functions

+
+
+

emit

+ function
+
Usage: (emit x & opts)
+
+
Prints an <?xml?> declaration line, and then calls emit-element
+ Source +
+
+

emit-element

+ function
+
Usage: (emit-element e & opts)
+
+
Recursively prints as XML text the element struct e.  To have it
+print extra whitespace like clojure.xml/emit, use the :pad true
+option.
+ Source +
+
+

parse-seq

+ function
+
Usage: (parse-seq s)
+       (parse-seq s startparse)
+       (parse-seq s startparse queue-size)
+
+
Parses the source s, which can be a File, InputStream or String
+naming a URI. Returns a lazy sequence of maps with two or more of
+the keys :type, :name, :attrs, and :str. Other SAX-compatible
+parsers can be supplied by passing startparse, a fn taking a source
+and a ContentHandler and returning a parser. If a parser is
+specified, it will be run in a separate thread and be allowed to get
+ahead by queue-size items, which defaults to maxing.  If no parser
+is specified and org.xmlpull.v1.XmlPullParser is in the classpath,
+this superior pull parser will be used.
+ Source +
+
+

parse-trim

+ function
+
Usage: (parse-trim s)
+       (parse-trim s startparse queue-size)
+
+
Parses the source s, which can be a File, InputStream or String
+naming a URI. Returns a lazy tree of the clojure.xml/element
+struct-map, which has the keys :tag, :attrs, and :content and
+accessor fns tag, attrs, and content, with the whitespace trimmed
+from around each content string. This format is compatible with what
+clojure.xml/parse produces, except :content is a lazy seq instead of
+a vector.  Other SAX-compatible parsers can be supplied by passing
+startparse, a fn taking a source and a ContentHandler and returning
+a parser. If a parser is specified, it will be run in a separate
+thread and be allowed to get ahead by queue-size items, which
+defaults to maxing.  If no parser is specified and
+org.xmlpull.v1.XmlPullParser is in the classpath, this superior pull
+parser will be used.
+ Source +
+ + +
+
+
+
+
+
+ +
+ +
Logo & site design by Tom Hickey.
+
+ + + + \ No newline at end of file -- cgit v1.2.3-70-g09d2