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:
(require 'xml)
The following types and functions assume:
(require 'xml)
Procedure: make-element tag [attribute ...] child ...
Create a representation of a XML element, corresponding to
<tagattribute...>child...</tag>The result is a
TreeList, though if the result context is a consumer the result is instead "written" to the consumer. Thus nested calls tomake-elementonly result in a singleTreeList. More generally, whether anattributeorchildis includded by copying or by reference is (for now) undefined. Thetagshould currently be a symbol, though in the future it should be a qualified name. Anattributeis typically a call tomake-attribute, but it can be any attribute-valued expression.(make-element 'p "The time is now: " (make-element 'code (make <java.util.Date>)))
Procedure: make-attribute name value...
Create an "attribute", which is a name-value pair. For now,
nameshould be a symbol.
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.
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.