API for package S-XML

A simple XML parser with an efficient, purely functional, event-based interface as well as a DOM interface

*attribute-name-parser*   variable

Called to compute interned attribute name from a buffer that will be reused
Initial value: #<Function PARSE-ATTRIBUTE-NAME>

*attribute-value-parser*   variable

Called to compute an element of an attribute list from a buffer that will be reused
Initial value: #<Function PARSE-ATTRIBUTE-VALUE>

*auto-create-namespace-packages*   variable

If t, new packages will be created for namespaces, if needed, named by the prefix
Initial value: T

*auto-export-symbols*   variable

If t, export newly interned symbols form their packages
Initial value: T

*ignore-namespaces*   variable

When t, namespaces are ignored like in the old version of S-XML
Initial value: NIL

*local-namespace*   variable

The local (global default) XML namespace
Initial value: #<S-XML::XML-NAMESPACE - local 10D4E317>

*namespaces*   variable

Ordered list of (prefix . XML-namespace) bindings currently in effect - special variable
Initial value: ((xml . #<S-XML::XML-NAMESPACE xml - http://www.w3.org/XML/1998/namespace 10D14CCB>) ( . #<S-XML::XML-NAMESPACE - local 10D4E317>))

*require-existing-symbols*   variable

If t, each XML identifier must exist as symbol already
Initial value: NIL

(extend-namespaces attributes namespaces)   function

Given possible 'xmlns[:prefix]' attributes, extend the namespaces bindings

(find-namespace uri)   function

Find a registered XML namespace identified by uri

(first-xml-element-child xml-element)   function

Get the first child of an xml-element

(get-entities xml-parser-state)   generic-function

Get the entities hashtable of an XML parser state

(setf (get-entities xml-parser-state) value)   generic-function

Set the entities hashtable of an XML parser state

(get-finish-element-hook xml-parser-state)   generic-function

Get the finish element hook of an XML parser state

(setf (get-finish-element-hook xml-parser-state) value)   generic-function

Set the finish element hook of an XML parser state

(get-new-element-hook xml-parser-state)   generic-function

Get the new element hook of an XML parser state

(setf (get-new-element-hook xml-parser-state) value)   generic-function

Set the new element hook of an XML parser state

(get-package xml-namespace)   generic-function

The Common Lisp package where this namespace's symbols are interned

(get-prefix xml-namespace)   generic-function

The preferred prefix assigned to this namespace

(get-seed xml-parser-state)   generic-function

Get the initial user seed of an XML parser state

(setf (get-seed xml-parser-state) value)   generic-function

Set the initial user seed of an XML parser state

(get-text-hook xml-parser-state)   generic-function

Get the text hook of an XML parser state

(setf (get-text-hook xml-parser-state) value)   generic-function

Set the text hook of an XML parser state

(get-uri xml-namespace)   generic-function

The URI used to identify this namespace

(make-xml-element &key name attributes children)   function

Make and return a new xml-element struct

(new-xml-element name &rest children)   function

Make a new xml-element with name and children

(parse-attribute-name string)   function

Default parser for the attribute name

(parse-attribute-value name string)   function

Default parser for the attribute value

(parse-xml stream &key (output-type :lxml))   function

Parse a character stream as XML and generate a DOM of output-type, defaulting to :lxml

(parse-xml-dom stream output-type)   generic-function

Parse a character stream as XML and generate a DOM of output-type

(parse-xml-file filename &key (output-type :lxml))   function

Parse a character file as XML and generate a DOM of output-type, defaulting to :lxml

(parse-xml-string string &key (output-type :lxml))   function

Parse a string as XML and generate a DOM of output-type, defaulting to :lxml

(print-identifier identifier stream &optional as-attribute)   function

Print identifier on stream using namespace conventions

(print-string-xml string stream &key (start 0) end)   function

Write the characters of string to stream using basic XML conventions

(print-xml dom &key (stream t) pretty (input-type :lxml) (header))   function

Generate XML output on a character stream (t by default) from a DOM of input-type (:lxml by default), optionally pretty printing (off by default), or adding a header (none by default)

(print-xml-dom dom input-type stream pretty level)   generic-function

Generate XML output on a character stream from a DOM of input-type, optionally pretty printing using level

(print-xml-string dom &key pretty (input-type :lxml))   function

Generate XML output to a string from a DOM of input-type (:lxml by default), optionally pretty printing (off by default)

(register-namespace uri prefix package)   function

Register a new or redefine an existing XML namespace defined by uri with prefix and package

(resolve-identifier identifier namespaces &optional as-attribute)   function

Resolve the string identifier in the list of namespace bindings

(split-identifier identifier)   function

Split an identifier 'prefix:name' and return (values prefix name)

(start-parse-xml stream &optional (state (make-instance (quote xml-parser-state))))   function

Parse and return a toplevel XML element from stream, using parser state

(xml-element-attribute xml-element key)   function

Return the string value of the attribute with name the keyword :key of xml-element if any, return null if not found

(setf (xml-element-attribute xml-element key) value)   function

Set the string value of the attribute with name the keyword :key of xml-element, creating a new attribute if necessary or overwriting an existing one, returning the value

(xml-element-attributes object)   function

Return the alist of attribute names and values dotted pairs from an xml-element struct

(xml-element-children object)   function

Return the list of children from an xml-element struct

(xml-element-name object)   function

Return the name from an xml-element struct

(xml-element-p object)   function

Return T when the argument is an xml-element struct

xml-parser-error   condition

Thrown by the XML parser to indicate errorneous input
Class precedence list: xml-parser-error error serious-condition condition standard-object t
Class init args: :stream :args :message

(xml-parser-error-args xml-parser-error)   generic-function

Get the error arguments from an XML parser error

(xml-parser-error-message xml-parser-error)   generic-function

Get the message from an XML parser error

(xml-parser-error-stream xml-parser-error)   generic-function

Get the stream from an XML parser error

xml-parser-state   class

The XML parser state passed along all code making up the parser
Class precedence list: xml-parser-state standard-object t
Class init args: :text-hook :finish-element-hook :new-element-hook :seed :entities

Documentation generated by lispdoc running on LispWorks