This is the s-xml Reference Manual, version 3, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:38:26 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
s-xml
Simple Common Lisp XML Parser
Sven Van Caekenberghe <svc@mac.com>
Sven Van Caekenberghe <svc@mac.com>
Lisp Lesser General Public License (LLGPL)
S-XML is a Common Lisp implementation of a simple XML parser, with a SAX-like and DOM interface
3
src
(module).
Modules are listed depth-first from the system components tree.
s-xml/src
s-xml
(system).
package.lisp
(file).
xml.lisp
(file).
dom.lisp
(file).
lxml-dom.lisp
(file).
sxml-dom.lisp
(file).
xml-struct-dom.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
s-xml/s-xml.asd
s-xml/src/package.lisp
s-xml/src/xml.lisp
s-xml/src/dom.lisp
s-xml/src/lxml-dom.lisp
s-xml/src/sxml-dom.lisp
s-xml/src/xml-struct-dom.lisp
s-xml/src/xml.lisp
package.lisp
(file).
src
(module).
*attribute-name-parser*
(special variable).
*attribute-value-parser*
(special variable).
*auto-create-namespace-packages*
(special variable).
*auto-export-symbols*
(special variable).
*ignore-namespaces*
(special variable).
*local-namespace*
(special variable).
*namespaces*
(special variable).
*require-existing-symbols*
(special variable).
extend-namespaces
(function).
find-namespace
(function).
get-entities
(reader method).
(setf get-entities)
(writer method).
get-finish-element-hook
(reader method).
(setf get-finish-element-hook)
(writer method).
get-new-element-hook
(reader method).
(setf get-new-element-hook)
(writer method).
get-package
(reader method).
(setf get-package)
(writer method).
get-prefix
(reader method).
(setf get-prefix)
(writer method).
get-seed
(reader method).
(setf get-seed)
(writer method).
get-text-hook
(reader method).
(setf get-text-hook)
(writer method).
get-uri
(reader method).
(setf get-uri)
(writer method).
parse-attribute-name
(function).
parse-attribute-value
(function).
print-identifier
(function).
print-object
(method).
print-string-xml
(function).
register-namespace
(function).
resolve-identifier
(function).
split-identifier
(function).
start-parse-xml
(function).
xml-parser-error
(condition).
xml-parser-error-args
(reader method).
xml-parser-error-message
(reader method).
xml-parser-error-stream
(reader method).
xml-parser-state
(class).
*known-namespaces*
(special variable).
*xml-namespace*
(special variable).
find-namespace-binding
(function).
get-buffer
(reader method).
get-buffer
(method).
(setf get-buffer)
(writer method).
get-mini-buffer
(reader method).
get-mini-buffer
(method).
(setf get-mini-buffer)
(writer method).
identifier-char-p
(function).
make-extendable-string
(function).
make-standard-entities
(function).
new-namespace
(function).
parse-identifier
(function).
parse-string
(function).
parse-text
(function).
parse-whitespace
(function).
parse-xml-element
(function).
parse-xml-element-attributes
(function).
parser-error
(function).
read-cdata
(function).
resolve-entity
(function).
skip-comment
(function).
skip-special-tag
(function).
skip-whitespace
(function).
whitespace-char-p
(function).
xml-namespace
(class).
s-xml/src/dom.lisp
package.lisp
(file).
xml.lisp
(file).
src
(module).
parse-xml
(function).
parse-xml-dom
(generic function).
parse-xml-file
(function).
parse-xml-string
(function).
print-xml
(function).
print-xml-dom
(generic function).
print-xml-string
(function).
print-attribute
(function).
print-closing-tag
(function).
print-solitary-tag
(function).
print-spaces
(function).
s-xml/src/lxml-dom.lisp
dom.lisp
(file).
src
(module).
parse-xml-dom
(method).
print-xml-dom
(method).
lxml-finish-element-hook
(function).
lxml-new-element-hook
(function).
lxml-text-hook
(function).
plist->alist
(function).
s-xml/src/sxml-dom.lisp
dom.lisp
(file).
src
(module).
parse-xml-dom
(method).
print-xml-dom
(method).
sxml-finish-element-hook
(function).
sxml-new-element-hook
(function).
sxml-text-hook
(function).
s-xml/src/xml-struct-dom.lisp
dom.lisp
(file).
src
(module).
first-xml-element-child
(function).
make-xml-element
(function).
new-xml-element
(function).
parse-xml-dom
(method).
print-xml-dom
(method).
xml-element-attribute
(function).
(setf xml-element-attribute)
(function).
xml-element-attributes
(reader).
(setf xml-element-attributes)
(writer).
xml-element-children
(reader).
(setf xml-element-children)
(writer).
xml-element-name
(reader).
(setf xml-element-name)
(writer).
xml-element-p
(function).
copy-xml-element
(function).
standard-finish-element-hook
(function).
standard-new-element-hook
(function).
standard-text-hook
(function).
xml-element
(structure).
xml-equal
(function).
Packages are listed by definition order.
s-xml
A simple XML parser with an efficient, purely functional, event-based interface as well as a DOM interface
common-lisp
.
*attribute-name-parser*
(special variable).
*attribute-value-parser*
(special variable).
*auto-create-namespace-packages*
(special variable).
*auto-export-symbols*
(special variable).
*ignore-namespaces*
(special variable).
*local-namespace*
(special variable).
*namespaces*
(special variable).
*require-existing-symbols*
(special variable).
extend-namespaces
(function).
find-namespace
(function).
first-xml-element-child
(function).
get-entities
(generic reader).
(setf get-entities)
(generic writer).
get-finish-element-hook
(generic reader).
(setf get-finish-element-hook)
(generic writer).
get-new-element-hook
(generic reader).
(setf get-new-element-hook)
(generic writer).
get-package
(generic reader).
(setf get-package)
(generic writer).
get-prefix
(generic reader).
(setf get-prefix)
(generic writer).
get-seed
(generic reader).
(setf get-seed)
(generic writer).
get-text-hook
(generic reader).
(setf get-text-hook)
(generic writer).
get-uri
(generic reader).
(setf get-uri)
(generic writer).
make-xml-element
(function).
new-xml-element
(function).
parse-attribute-name
(function).
parse-attribute-value
(function).
parse-xml
(function).
parse-xml-dom
(generic function).
parse-xml-file
(function).
parse-xml-string
(function).
print-identifier
(function).
print-string-xml
(function).
print-xml
(function).
print-xml-dom
(generic function).
print-xml-string
(function).
register-namespace
(function).
resolve-identifier
(function).
split-identifier
(function).
start-parse-xml
(function).
xml-element-attribute
(function).
(setf xml-element-attribute)
(function).
xml-element-attributes
(reader).
(setf xml-element-attributes)
(writer).
xml-element-children
(reader).
(setf xml-element-children)
(writer).
xml-element-name
(reader).
(setf xml-element-name)
(writer).
xml-element-p
(function).
xml-parser-error
(condition).
xml-parser-error-args
(generic reader).
xml-parser-error-message
(generic reader).
xml-parser-error-stream
(generic reader).
xml-parser-state
(class).
*known-namespaces*
(special variable).
*xml-namespace*
(special variable).
copy-xml-element
(function).
find-namespace-binding
(function).
get-buffer
(generic function).
(setf get-buffer)
(generic writer).
get-mini-buffer
(generic function).
(setf get-mini-buffer)
(generic writer).
identifier-char-p
(function).
lxml-finish-element-hook
(function).
lxml-new-element-hook
(function).
lxml-text-hook
(function).
make-extendable-string
(function).
make-standard-entities
(function).
new-namespace
(function).
parse-identifier
(function).
parse-string
(function).
parse-text
(function).
parse-whitespace
(function).
parse-xml-element
(function).
parse-xml-element-attributes
(function).
parser-error
(function).
plist->alist
(function).
print-attribute
(function).
print-closing-tag
(function).
print-solitary-tag
(function).
print-spaces
(function).
read-cdata
(function).
resolve-entity
(function).
skip-comment
(function).
skip-special-tag
(function).
skip-whitespace
(function).
standard-finish-element-hook
(function).
standard-new-element-hook
(function).
standard-text-hook
(function).
sxml-finish-element-hook
(function).
sxml-new-element-hook
(function).
sxml-text-hook
(function).
whitespace-char-p
(function).
xml-element
(structure).
xml-equal
(function).
xml-namespace
(class).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Called to compute interned attribute name from a buffer that will be reused
Called to compute an element of an attribute list from a buffer that will be reused
If t, new packages will be created for namespaces, if needed, named by the prefix
If t, export newly interned symbols form their packages
When t, namespaces are ignored like in the old version of S-XML
The local (global default) XML namespace
Ordered list of (prefix . XML-namespace) bindings currently in effect - special variable
If t, each XML identifier must exist as symbol already
Given possible ’xmlns[:prefix]’ attributes, extend the namespaces bindings
Find a registered XML namespace identified by uri
Get the first child of an xml-element
Make and return a new xml-element struct
Make a new xml-element with name and children
Default parser for the attribute name
Default parser for the attribute value
Parse a character stream as XML and generate a DOM of output-type, defaulting to :lxml
Parse a character file as XML and generate a DOM of output-type, defaulting to :lxml
Parse a string as XML and generate a DOM of output-type, defaulting to :lxml
Print identifier on stream using namespace conventions
Write the characters of string to stream using basic XML conventions
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)
Generate XML output to a string from a DOM of input-type (:lxml by default), optionally pretty printing (off by default)
Register a new or redefine an existing XML namespace defined by uri with prefix and package
Resolve the string identifier in the list of namespace bindings
Split an identifier ’prefix:name’ and return (values prefix name)
Parse and return a toplevel XML element from stream, using parser state
Return the string value of the attribute with name the keyword :key of xml-element if any, return null if not found
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
Return the alist of attribute names and values dotted pairs from an xml-element struct
Return the list of children from an xml-element struct
Return the name from an xml-element struct
name
.
Return T when the argument is an xml-element struct
Get the entities hashtable of an XML parser state
xml-parser-state
)) ¶A hashtable mapping XML entity names to their replacement stings
Set the entities hashtable of an XML parser state
xml-parser-state
)) ¶A hashtable mapping XML entity names to their replacement stings
Get the finish element hook of an XML parser state
xml-parser-state
)) ¶Called when element ends
Set the finish element hook of an XML parser state
xml-parser-state
)) ¶Called when element ends
Get the new element hook of an XML parser state
xml-parser-state
)) ¶Called when new element starts
Set the new element hook of an XML parser state
xml-parser-state
)) ¶Called when new element starts
The Common Lisp package where this namespace’s symbols are interned
xml-namespace
)) ¶The Common Lisp package where this namespace’s symbols are interned
xml-namespace
)) ¶The Common Lisp package where this namespace’s symbols are interned
The preferred prefix assigned to this namespace
xml-namespace
)) ¶The preferred prefix assigned to this namespace
xml-namespace
)) ¶The preferred prefix assigned to this namespace
Get the initial user seed of an XML parser state
xml-parser-state
)) ¶The user seed object
Set the initial user seed of an XML parser state
xml-parser-state
)) ¶The user seed object
Get the text hook of an XML parser state
xml-parser-state
)) ¶Called when text is found
Set the text hook of an XML parser state
xml-parser-state
)) ¶Called when text is found
The URI used to identify this namespace
xml-namespace
)) ¶The URI used to identify this namespace
xml-namespace
)) ¶The URI used to identify this namespace
Parse a character stream as XML and generate a DOM of output-type
Generate XML output on a character stream from a DOM of input-type, optionally pretty printing using level
Get the error arguments from an XML parser error
xml-parser-error
)) ¶Get the message from an XML parser error
xml-parser-error
)) ¶Get the stream from an XML parser error
xml-parser-error
)) ¶Thrown by the XML parser to indicate errorneous input
error
.
:message
This slot is read-only.
:args
This slot is read-only.
common-lisp
.
(quote nil)
:stream
This slot is read-only.
The XML parser state passed along all code making up the parser
get-buffer
.
(setf get-buffer)
.
get-buffer
.
(setf get-entities)
.
get-entities
.
(setf get-finish-element-hook)
.
get-finish-element-hook
.
get-mini-buffer
.
(setf get-mini-buffer)
.
get-mini-buffer
.
(setf get-new-element-hook)
.
get-new-element-hook
.
(setf get-seed)
.
get-seed
.
(setf get-text-hook)
.
get-text-hook
.
A hashtable mapping XML entity names to their replacement stings
(s-xml::make-standard-entities)
:entities
The user seed object
:seed
The main reusable character buffer
(s-xml::make-extendable-string)
The secondary, smaller reusable character buffer
(s-xml::make-extendable-string)
Called when new element starts
(function (lambda (s-xml::name s-xml::attributes s-xml::seed) (declare (ignore s-xml::name s-xml::attributes)) s-xml::seed))
:new-element-hook
Called when element ends
(function (lambda (s-xml::name s-xml::attributes s-xml::parent-seed s-xml::seed) (declare (ignore s-xml::name s-xml::attributes s-xml::parent-seed)) s-xml::seed))
:finish-element-hook
Called when text is found
(function (lambda (string s-xml::seed) (declare (ignore string)) s-xml::seed))
:text-hook
The list of known/defined namespaces
REC-xml-names-19990114 says the prefix xml is bound to the namespace http://www.w3.org/XML/1998/namespace.
Find the XML namespace currently bound to prefix in the namespaces bindings
Is char an XML identifier character ?
Make an extendable string which is a one-dimensional character array which is adjustable and has a fill pointer
A hashtable mapping XML entity names to their replacement strings, filled with the standard set
Register a new namespace for uri and prefix, creating a package if necessary
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
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
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
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 #Null on eof
Parse and return an XML element from stream, positioned after the opening ’<’
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
Reads in the CDATA and calls the callback for CDATA if it exists
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
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
Skip an XML special tag (comments and processing instructions) in stream, positioned after the opening ’<’, unexpected eof is an error
Skip over XML whitespace in stream, return first non-whitespace character which was peeked but not read, return nil on eof
Is char an XML whitespace character ?
xml-parser-state
)) ¶Reset and return the main reusable buffer
xml-parser-state
)) ¶The main reusable character buffer
xml-parser-state
)) ¶The main reusable character buffer
xml-parser-state
)) ¶Reset and return the reusable mini buffer
xml-parser-state
)) ¶The secondary, smaller reusable character buffer
xml-parser-state
)) ¶The secondary, smaller reusable character buffer
Describes an XML namespace and how it is handled
The URI used to identify this namespace
:uri
The preferred prefix assigned to this namespace
:prefix
The Common Lisp package where this namespace’s symbols are interned
common-lisp
.
:package
Jump to: | (
C E F G I L M N P R S W X |
---|
Jump to: | (
C E F G I L M N P R S W X |
---|
Jump to: | *
A B C E F M N P S T U |
---|
Jump to: | *
A B C E F M N P S T U |
---|
Jump to: | C D F L M P S X |
---|
Jump to: | C D F L M P S X |
---|