def generate
      create_header
      unless @fields.empty?
        @fields.each { |field| create_field(field) }
      end
      create_footer
      @dtd << Ox.dump(@doc).strip
    end
def generate
      create_header
      unless @fields.empty?
        @fields.each { |field| create_field(field) }
      end
      create_footer
      @dtd << Ox.dump(@doc).strip
    end
Initialization
 Create the XML and return XML string