# File htree/traverse.rb, line 368 def root es = [] children.each {|c| es << c if c.elem? } raise HTree::Error, "no element" if es.empty? raise HTree::Error, "multiple top elements" if 1 < es.length es[0] end