Comment nodes

A comment node encapsulates XML comments.

A comment node can have zero or one parent.
A comment node has the following node properties:
  • content
  • parent
For example, consider the following content:
 <ID>
<!-- This element contains an ID number. -->
101
</ID>                                   

This comment has the following property values:

Table 1. Properties of the comment node
Node property Value
content This element contains an ID number.
parent ID node
The string value of a comment node is the content of the node, which in the case of the preceding example is This element contains an ID number. The typed value is the same value as the string value and is also type xs:string.