Represent a DOM node in ABL
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
In essence, X-document represents the collection of nodes, their content of the nodes, and all the relationships between nodes.
The X-noderef object is an ABL object that is a reference to
any node in a DOM tree (except a DOCUMENT node,
which is the X-document). In ABL, you can create a handle to an
X-noderef object, which in turn is a cursor pointing to a DOM node
in a DOM tree (represented by an ABL X-document object).
The life cycle of an X-noderef object is similar to the X-document object's. For example:
|
There are many types of DOM nodes as identified by the SUBTYPE attribute
of both the X-document and X-noderef objects. Some types of nodes
may have child nodes of various types, and others are leaf nodes
that cannot have anything below them in the document structure.
The ABL X-noderef object can be one of the following DOM node
types, as indicated by the SUBTYPE attribute:
-
ATTRIBUTE -
CDATA-SECTION -
COMMENT -
DOCUMENT-FRAGMENT -
ELEMENT -
ENTITY-REFERENCE -
PROCESSING-INSTRUCTION -
TEXT
The default subtype is ELEMENT.
The following table shows X-noderef object SUBTYPE values,
and how the NAME and NODE-VALUE attributes
are different based on SUBTYPE.
| SUBTYPE attribute | NAME attribute | NODE-VALUE attribute |
|---|---|---|
|
The name of the attribute. Primarily used with namespaces | The value of the attribute |
|
Ignored | Content of the fragment |
|
XML tag name, including namespace information | Null |
|
The name of the entity referenced without the leading ampersand and trailing semicolon | Null |
|
Ignored | Content of the text node |
|
Ignored | Content of the CDATA-SECTION |
|
Ignored | Content of the COMMENT |
|
The target, which is the first XML token following the <? markup |
Content excluding the target |