def xml
      h = Element.new('history')
      events.each do |event| h << event.xml end
      h
    end
def xml
      h = Element.new('history')
      events.each do |event| h << event.xml end
      h
    end
used when creating a new metadata file for a static XML file

 @return [Doc] returns self as XML document