def []( index, name=nil)
if index.kind_of? Integer
raise "index (#{index}) must be >= 1" if index < 1
name = literalize name if name
num = 0
child = nil
@element.find { |child|
child.kind_of? Element and
(name.nil? ? true : child.has_name?( name )) and
(num += 1) == index
}
elsereturn XPath::first( @element, index )
#{ |element| # return element if element.kind_of? Element#}#return nilendend