The [xml_nodeList->item] method returns an element from an xml_nodeList object. The method requires one parameter which is the integer index of the element to be returned.
Note: Unlike Lasso™ array objects, xml_nodeLists are 0 indexed. ie. to return the first element of the list use xml_nodeList->item( 0 ).
xml_nodeList->item( index )
Use the [xml_nodeList->item] method.
This example retrieves the "date" node of the 3rd Monday from a list of dates stored in an xml document.
Note: whitespace is included in the xml snippet for readability only.
var( aMonth = xml('<weekday day="Monday"> <date>4</date><date>11</date><date>16</date><date>23</date><date>30</date> </weekday>') ) var( mondays = $aMonth->childNodes ) $mondays->item(2)
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