The XML data model is similar to HTML, with one important addition: XML tags may be qualified names, which are similar to compound symbols.
You must do this to use the following types and functions:
The following types and functions assume:
Create a representation of a XML element, corresponding to
The result is a
TreeList, though if the result context is a consumer
the result is instead "written" to the consumer.
Thus nested calls to
make-element only result in a
More generally, whether an attribute or child is includded
by copying or by reference is (for now) undefined.
The tag should currently be a symbol, though in the future it should
be a qualified name.
An attribute is typically a call to
but it can be any attribute-valued expression.
(make-element 'p "The time is now: " (make-element 'code (make <java.util.Date>)))
Returns the name (tag) of the element node, as a symbol (QName).
Create an "attribute", which is a name-value pair. For now, name should be a symbol.
Returns the name of the attribute node, as a symbol (QName).
Instances of this type represent comment values, specifically including comments in XML files. Comment nodes are currently ignored when printing using Scheme formatting, though that may change.
Create a comment object with the specified comment-text.
Instances of this type represent “processing instructions”, such as may appear in XML files. Processing-instruction nodes are currently ignored when printing using Scheme formatting, though that may change.
Crreate a processing-instruction object with the specified target (a simple symbol) and contents (a string).