code: public Node item(int index)
    {
  
      // It is assumed that the getChildNodes call synchronized
      // the children. Therefore, we can access the first child
      // reference directly.
      ElemTemplateElement node = m_firstChild;
  
      for (int i = 0; i < index && node != null; i++)
      {
        node = node.m_nextSibling;
      }
  
      return node;
    }
docs: NodeList method: Return the Nth immediate child of this node, or
  null if the index is out of bounds.
  
  @param index Index of child to find
  @return org.w3c.dom.Node: the child node at given index