The value of this node, depends of its type. When is defined null, the setting has no effect, including if the node is read-only.
The node can be passed as argument or as attribute.
1 dom.node.getNodeValue
<dom.node.getNodeValue name='name'>
<node /> !
</dom.node.getNodeValue>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Aname | String |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Enode | Node |
Returns | |
---|---|
Type | Description |
String | Returns the value of the node. If the node is an element returns null. |
Example
Get the value of two node of a file.
Copy
<xsql-script name='dom_node_getNodeValue'> <body> <set name='root'> <dom.parse><file name='data.xml' type='absolute' /></dom.parse> </set> <!-- It is situated in the text node which contains the text hello --> <set name='elem_text'> <dom.node.getFirstChild> <dom.element.getFirstChildElement><root /></dom.element.getFirstChildElement> </dom.node.getFirstChild> </set> <!-- Return null because it is an element --> <println> <dom.node.getNodeValue> <root/> </dom.node.getNodeValue> </println> <!-- Return hello --> <println> <dom.node.getNodeValue> <elem_text/> </dom.node.getNodeValue> </println> </body> </xsql-script>