(Adapted from Jeni Tennison)
The first class object type is a sequence; that is, an ordered list
Sequences contain items of two types: simple typed values or nodes. (They may not contain other sequences.)
Simple typed values have W3C XML Schema Language simple types: xs:gYear, xs:int, xs:decimal, xs:date, etc.
Seven node types: document, element, attribute, text, namespace, processing instruction, and comment
Nodes have these properties:
node-kind: either "document", "element", "attribute", "text", "namespace", "processing-instruction", or "comment".
node-name: a sequence containing one expanded QName if the node has a name (elements, attributes, etc.) or an empty sequence if the node doesn't have a name (comments, text nodes, etc.)
parent: a sequence containing the unique parent node; the empty sequence is returned for parentless nodes, particularly document and namespace nodes
base-uri: URI from which this particular node came (possibly adjusted by
an xml:base
attribute)
document-uri: URI from which this node's document came
string-value: same as XPath 1.0
typed-value: a sequence of simple typed values corresponding to the node (always the empty sequence for anything other than elements and attributes)
children: A sequence of nodes (empty except for element and document nodes)
attributes: a sequence of attribute nodes; empty except for element nodes
namespaces: a sequence of namespace nodes in-scope on the node
nilled: true if this is a nil element (xsi:nil="true"
),
false otherwise
type: a sequence containing 0 or 1 schema component
Infoset compatible