Link Search Menu Expand Document

XmlNodeList.Item Method

Explanation Fetch the node by specifying the index.
Call format var node = list.Item( index )
Return value XmlNode object
If the corresponding node is not found, such as by specifying an index that is greater than or equal to the Length property , null is returned.
Arguments integer index Position of the node to be retrieved ( by specifying an index starting from 0 )
Exception None
Example of use
    var domimpl = new XmlDOMImplementation;
    var res = session.Get("/test/sample.xml");
    var xmldoc = domimpl.Load(res);
    var list = xmldoc.DocumentElement.ChildNodes;
    for (var n = 0; n < list.Length; n++) {
        print(list.Item(n).NodeName, "\n");
    }
    
Related item XmlNode class
Length property
[ ] operator