About
Like the Document Object Model (DOM), the XSLT/XPath data model 1) consists of a tree containing a variety of nodes.
The XPath specification defines an abstract document model that defines seven kinds of nodes 2):
- Root: - The Xpath root node 3) of the XML data is modeled by an element node. It contains the Xml document's root element as well as other information relating to the document.
- text nodes, - In a text node, for example, it makes no difference whether the text was defined in a CDATA section or whether it included entity references.
- processing instruction nodes.
In this abstract model, syntactic distinctions disappear, and you are left with a normalized view of the data.
The text node will consist of normalized data, as it exists after all parsing is complete. So the text will contain a < character, whether or not an entity reference such as < or a CDATA section was used to include it. (Similarly, the text will contain an & character, whether it was delivered using & or it was in a CDATA section).
Each element has an associated string-value, which is formed by concatenating all the text segments that lie under the element.