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-elementonly result in a single
TreeList. More generally, whether an
childis includded by copying or by reference is (for now) undefined. The
tagshould currently be a symbol, though in the future it should be a qualified name. An
attributeis typically a call to
make-attribute, 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,
nameshould 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
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