def to_a( xpath=nil )
      rv = XPath.match( @element, xpath )
      return rv.find_all{|e| e.kind_of? Element} if xpath
      rv
    end
def to_a( xpath=nil )
      rv = XPath.match( @element, xpath )
      return rv.find_all{|e| e.kind_of? Element} if xpath
      rv
    end
Returns an Array of Element children.  An XPath may be supplied to
 filter the children.  Only Element children are returned, even if the
 supplied XPath matches non-Element children.
  doc = Document.new '<a>sean<b/>elliott<c/></a>'
  doc.root.elements.to_a                  #-> [ <b/>, <c/> ]
  doc.root.elements.to_a("child::node()") #-> [ <b/>, <c/> ]
  XPath.match(doc.root, "child::node()")  #-> [ sean, <b/>, elliott, <c/> ]