The name of this node, depends of its type. The node can be passed as argument or as attribute.
1 dom.getNodeName
<dom.getNodeName name='name'>
<node /> !
</dom.getNodeName>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Aname | String |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Enode | Node |
Returns | |
---|---|
Type | Description |
Node | Returns the name of the node. |
Example
Get the name of two nodes of a file.
Copy
<xsql-script name='dom_node_getNodeName'> <body> <set name='root'> <dom.parse><file name='data.xml' type='absolute' /></dom.parse> </set> <!-- It is situated in the first text node (the Line break) --> <set name='elem_text'> <dom.node.getFirstChild><root /></dom.node.getFirstChild> </set> <!-- Return the file --> <println> <dom.node.getNodeName> <root/> </dom.node.getNodeName> </println> <!-- Return #text --> <println> <dom.node.getNodeName> <elem_text/> </dom.node.getNodeName> </println> </body> </xsql-script>