Returns the name of the given node.
xml_node->nodeName
This example iterates through an xml_node and displays the name of each of its child nodes.
Code
var( rhino = xml('<rhino>
<name>Sean</name>
<title>Grand Poobah</title>
<location>Canada</location>
<hairColour>Variable</hairColour>
</rhino>') )
loop($rhino->childNodes->length) => {^
local( myNode = $rhino->childNodes->item( loop_count - 1 ) )
'Node '+loop_count+' is '+#myNode->nodeName+'\n'
^}
Result
Node 1 is #text Node 2 is name Node 3 is #text Node 4 is title Node 5 is #text Node 6 is location Node 7 is #text Node 8 is hairColour Node 9 is #text
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft
Recent Comments