U:RDoc::AnyMethod[iI"[]:EFI"REXML::Elements#[];TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"LFetches a child element. Filters only Element children, regardless of ;TI"the XPath match.;To:RDoc::Markup::List:
@type: NOTE:@items[o:RDoc::Markup::ListItem:@label[I"
index;T; [o;
; [I"=the search parameter. This is either an Integer, which ;TI"Cwill be used to find the index'th child Element, or an XPath, ;TI"@which will be used to search for the Element. Because ;TI"Gof the nature of XPath searches, any element in the connected XML ;TI"Edocument can be fetched through any other element. The ;TI"KInteger index is 1-based, not 0-based. This means that the first ;TI"Kchild element is at index 1, not 0, and the +n+th element is at index ;TI"L+n+, not n-1. This is because XPath indexes element children ;TI"@starting from 1, not 0, and the indexes should be the same.;To;;[I" name;T; [o;
; [I"9optional, and only used in the first argument is an ;TI"EInteger. In that case, the index'th child Element that has the ;TI"Msupplied name will be returned. Note again that the indexes start at 1.;To;;[I"Returns;T; [o;
; [I";the first matching Element, or nil if no child matched;To:RDoc::Markup::Verbatim; [ I"@doc = Document.new ''
;TI")doc.root.elements[1] #->
;TI"0doc.root.elements['c'] #->
;TI"/doc.root.elements[2,'c'] #-> ;T:@format0:
@fileI"lib/rexml/element.rb;T:0@omit_headings_from_table_of_contents_below000[ I"( index, name=nil);T@6FI"
Elements;TcRDoc::NormalClass00