Use node attributes and values
- Last Updated: October 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
You can get information about the child node by using
various attributes and methods. For example, if you do not know
how many nodes there are below the node referred to by the node
reference, you can use the NUM-CHILDREN attribute.
You can obtain or set the value of the node by using the NODE-VALUE attribute.
For example:
|
You can obtain a list of an element's attribute names using the ATTRIBUTE-NAMES attribute,
get the value of an attribute by using the GET-ATTRIBUTE( ) method
or set the value of an attribute by using the SET-ATTRIBUTE( ) method.
You can also REMOVE-ATTRIBUTE( ), as shown:
|
i-clone.p
In addition to creating nodes, you can IMPORT-NODE( ), CLONE-NODE( ),
and DELETE-NODE( ). In addition to appending
and getting a child, you can REMOVE-CHILD( ), REPLACE-CHILD( ),
and GET-PARENT( ). The following example
demonstrates the CLONE-NODE( ) method:
|
There are more methods and attributes that apply to the X-document object and the X-noderef objects. For more information on these attributes and methods, see their entries in the ABL Reference.