xml

Class summary
xml-namespace
xml-parser-state
Condition summary
xml-parser-error inherits from error
Method summary
get-buffer xml-parser-state
get-entities xml-parser-state
get-finish-element-hook xml-parser-state
get-mini-buffer xml-parser-state
get-new-element-hook xml-parser-state
get-package xml-namespace
get-prefix xml-namespace
get-seed xml-parser-state
get-text-hook xml-parser-state
get-uri xml-namespace
print-object (object xml-namespace) stream
xml-parser-error-args xml-parser-error
xml-parser-error-message xml-parser-error
xml-parser-error-stream xml-parser-error
Function summary
extend-namespaces attributes namespaces
find-namespace uri
find-namespace-binding prefix namespaces
identifier-char-p char
make-extendable-string &optional (size 10)
make-standard-entities
new-namespace uri &optional prefix
parse-identifier stream &optional (identifier (make-extendable-string))
parse-string stream state &optional (string (make-extendable-string))
parse-text stream state extendable-string
parse-whitespace stream extendable-string
parse-xml-element stream state
parse-xml-element-attributes stream state
parser-error message &optional args stream
print-identifier identifier stream &optional as-attribute
print-string-xml string stream &key (start 0) end
read-cdata stream state &optional (string (make-extendable-string))
register-namespace uri prefix package
resolve-entity stream extendable-string entities &optional (entity (make-extendable-string))
resolve-identifier identifier namespaces &optional as-attribute
skip-comment stream
skip-special-tag stream state
skip-whitespace stream
split-identifier identifier
start-parse-xml stream &optional (state (make-instance 'xml-parser-state))
whitespace-char-p char
xml-namespace    [Class]

Describes an XML namespace and how it is handled

:uri    [Initarg]
:prefix    [Initarg]
:package    [Initarg]
uri    [Slot]

The URI used to identify this namespace

prefix    [Slot]

The preferred prefix assigned to this namespace

package    [Slot]

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

get-package   xml-namespace  [Generic function]

Returns and (with setf) changes the package of the specified xml-namespace

get-prefix   xml-namespace  [Generic function]

Returns and (with setf) changes the prefix of the specified xml-namespace

get-uri   xml-namespace  [Generic function]

Returns and (with setf) changes the uri of the specified xml-namespace

xml-parser-state    [Class]

The XML parser state passed along all code making up the parser

:entities    [Initarg]
:seed    [Initarg]
:new-element-hook    [Initarg]
:finish-element-hook    [Initarg]
:text-hook    [Initarg]
entities    [Slot]

A hashtable mapping XML entity names to their replacement stings

seed    [Slot]

The user seed object

buffer    [Slot]

The main reusable character buffer

mini-buffer    [Slot]

The secondary, smaller reusable character buffer

new-element-hook    [Slot]

Called when new element starts

finish-element-hook    [Slot]

Called when element ends

text-hook    [Slot]

Called when text is found

get-text-hook   xml-parser-state  [Generic function]

Returns and (with setf) changes the text-hook of the specified xml-parser-state

get-finish-element-hook   xml-parser-state  [Generic function]

Returns and (with setf) changes the finish-element-hook of the specified xml-parser-state

get-new-element-hook   xml-parser-state  [Generic function]

Returns and (with setf) changes the new-element-hook of the specified xml-parser-state

get-mini-buffer   xml-parser-state  [Generic function]

Returns and (with setf) changes the mini-buffer of the specified xml-parser-state

get-buffer   xml-parser-state  [Generic function]

Returns and (with setf) changes the buffer of the specified xml-parser-state

get-seed   xml-parser-state  [Generic function]

Returns and (with setf) changes the seed of the specified xml-parser-state

get-entities   xml-parser-state  [Generic function]

Returns and (with setf) changes the entities of the specified xml-parser-state

xml-parser-error   inherits from error  [Condition]

Thrown by the XML parser to indicate errorneous input

:message    [Initarg]
:args    [Initarg]
:stream    [Initarg]
xml-parser-error-stream   xml-parser-error  [Generic function]

Returns the stream of the specified xml-parser-error

xml-parser-error-args   xml-parser-error  [Generic function]

Returns the args of the specified xml-parser-error

xml-parser-error-message   xml-parser-error  [Generic function]

Returns the message of the specified xml-parser-error

*ignore-namespaces*    [Variable]

When t, namespaces are ignored like in the old version of S-XML

*local-namespace*    [Variable]

The local (global default) XML namespace

*xml-namespace*    [Variable]

REC-xml-names-19990114 says the prefix xml is bound to the namespace http://www.w3.org/XML/1998/namespace.

*known-namespaces*    [Variable]

The list of known/defined namespaces

*namespaces*    [Variable]

Ordered list of (prefix . XML-namespace) bindings currently in effect - special variable

*require-existing-symbols*    [Variable]

If t, each XML identifier must exist as symbol already

*auto-export-symbols*    [Variable]

If t, export newly interned symbols form their packages

*auto-create-namespace-packages*    [Variable]

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

print-object   (object xml-namespace) stream  [Method]
parser-error   message &optional args stream  [Function]
whitespace-char-p   char  [Function]

Is char an XML whitespace character ?

identifier-char-p   char  [Function]

Is char an XML identifier character ?

skip-whitespace   stream  [Function]

Skip over XML whitespace in stream, return first non-whitespace character which was peeked but not read, return nil on eof

make-extendable-string   &optional (size 10)  [Function]

Make an extendable string which is a one-dimensional character array which is adjustable and has a fill pointer

print-string-xml   string stream &key (start 0) end  [Function]

Write the characters of string to stream using basic XML conventions

make-standard-entities    [Function]

A hashtable mapping XML entity names to their replacement strings, filled with the standard set

resolve-entity   stream extendable-string entities &optional (entity (make-extendable-string))  [Function]

Read and resolve an XML entity from stream, positioned after the '&' entity marker, accepting &name; &#DEC; and &#xHEX; formats, destructively modifying string, which is also returned, destructively modifying entity, incorrect entity formats result in errors

find-namespace   uri  [Function]

Find a registered XML namespace identified by uri

register-namespace   uri prefix package  [Function]

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

find-namespace-binding   prefix namespaces  [Function]

Find the XML namespace currently bound to prefix in the namespaces bindings

split-identifier   identifier  [Function]

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

resolve-identifier   identifier namespaces &optional as-attribute  [Function]

Resolve the string identifier in the list of namespace bindings

new-namespace   uri &optional prefix  [Function]

Register a new namespace for uri and prefix, creating a package if necessary

extend-namespaces   attributes namespaces  [Function]

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

print-identifier   identifier stream &optional as-attribute  [Function]

Print identifier on stream using namespace conventions

parse-whitespace   stream extendable-string  [Function]

Read and collect XML whitespace from stream in string which is destructively modified, return first non-whitespace character which was peeked but not read, return nil on eof

parse-string   stream state &optional (string (make-extendable-string))  [Function]

Read and return an XML string from stream, delimited by either single or double quotes, the stream is expected to be on the opening delimiter, at the end the closing delimiter is also read, entities are resolved, eof before end of string is an error

parse-text   stream state extendable-string  [Function]

Read and collect XML text from stream in string which is destructively modified, the text ends with a '<', which is peeked and returned, entities are resolved, eof is considered an error

parse-identifier   stream &optional (identifier (make-extendable-string))  [Function]

Read and returns an XML identifier from stream, positioned at the start of the identifier, ending with the first non-identifier character, which is peeked, the identifier is written destructively into identifier which is also returned

skip-comment   stream  [Function]

Skip an XML comment in stream, positioned after the opening '<!--', consumes the closing '-->' sequence, unexpected eof or a malformed closing sequence result in a error

read-cdata   stream state &optional (string (make-extendable-string))  [Function]

Reads in the CDATA and calls the callback for CDATA if it exists

skip-special-tag   stream state  [Function]

Skip an XML special tag (comments and processing instructions) in stream, positioned after the opening '<', unexpected eof is an error

parse-xml-element-attributes   stream state  [Function]

Parse XML element attributes from stream positioned after the tag identifier, returning the attributes as an assoc list, ending at either a '>' or a '/' which is peeked and also returned

parse-xml-element   stream state  [Function]

Parse and return an XML element from stream, positioned after the opening '<'

start-parse-xml   stream &optional (state (make-instance 'xml-parser-state))  [Function]

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