Lasso Soft Inc. > Home

[ xml_node->nodeName ]


Returns the name of the given node.

  • Syntax
  • Beginner

Return the name of an xml_node

This example iterates through an xml_node and displays the name of each of its child nodes.


var( rhino = xml('<rhino>
     <title>Grand Poobah</title>
</rhino>') )

loop($rhino->childNodes->length) => {^
      local( myNode = $rhino->childNodes->item( loop_count - 1 ) )
      'Node '+loop_count+' is '+#myNode->nodeName+'\n'


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

Recent Comments

No Comments found

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. > Home



©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft