Indicate if the node that has been passed is a text or not (in this case, it would be an element)- The node can be passed
as argument or as attribute.
1 dom.node.isTextNode
<dom.node.isTextNode name='name'>
<node /> !
</dom.node.isTextNode>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Aname | String |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Enode | Node |
Returns | |
---|---|
Type | Description |
Boolean | Indicates if the node that has been passed is a text or not (an element). |
Example
On differents nodes are obtained if it is a text.
Copy
<xsql-script name='dom_node_isTextNode'> <body> <set name='node'> <dom.parse><file name='data.xml' type='absolute' /></dom.parse> </set> <!-- Returns false, because it is in the root element <document> --> <println> <dom.node.isTextNode> <node /> </dom.node.isTextNode> </println> <!-- Returns true, because it is in the node text (Line break) that exist after the root node --> <println> <dom.node.isTextNode> <dom.node.getFirstChild><node /></dom.node.getFirstChild> </dom.node.isTextNode> </println> </body> </xsql-script>