The nodes in the XPath data model can be derived from the
information items provided by the XML Information Set XINFO as follows:
-
The root node comes from the document information item. The
children of the root node come from the children and children - comments
properties.
-
An element node comes from an element information item. The
children of an element node come from the children and children - comments properties. The
attributes of an element node come from the attributes property. The namespaces
of an element node come from the in-scope namespaces property. The
local part of the
[expanded-name]
of the element node
comes from the local name
property. The namespace URI of the
[expanded-name]
of the element node
comes from the namespace URI
property. The unique ID of the element node comes from the children property of the attribute
information item in the attributes property that has an attribute type property equal to
ID.
-
An attribute node comes from an attribute information item.
The local part of the
[expanded-name]
of the attribute node
comes from the local name
property. The namespace URI of the
[expanded-name]
of the attribute node
comes from the namespace URI
property. The
[string-value]
of
the node comes from concatenating the character code property of each member
of the children
property.
-
A text node comes from a sequence of one or more consecutive
character information items. The
[string-value]
of the node comes from
concatenating the character code
property of each of the character information items.
-
A processing instruction node comes from a processing
instruction information item. The local part of the
[expanded-name]
of the node comes from
the target property. (The
namespace URI part of the
[expanded-name]
of the node is null.)
The
[string-value]
of the node
comes from the content
property. There are no processing instruction nodes for processing
instruction items that are children of document type declaration
information item.
-
A comment node comes from a comment information item. The
[string-value]
of the node
comes from the content property.
There are no comment nodes for comment information items that are
children of document type declaration information item.
-
A namespace node comes from a namespace declaration
information item. The local part of the
[expanded-name]
of the node comes from
the prefix property. (The
namespace URI part of the
[expanded-name]
of the node is null.)
The
[string-value]
of the node
comes from the namespace URI
property.