def to_xml
      xml = ""
      xml << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
      xml << "<d:dictionary xmlns=\"http://www.w3.org/1999/xhtml\" "
      xml << "xmlns:d=\"http://www.apple.com/DTDs/DictionaryService-1.0.rng\">\n"
      @entries.each do |entry|
        next if entry.to_xml.nil?

        xml << entry.to_xml
      end
      xml << "</d:dictionary>"

      return xml
    end
def to_xml
      xml = ""
      xml << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
      xml << "<d:dictionary xmlns=\"http://www.w3.org/1999/xhtml\" "
      xml << "xmlns:d=\"http://www.apple.com/DTDs/DictionaryService-1.0.rng\">\n"
      @entries.each do |entry|
        next if entry.to_xml.nil?

        xml << entry.to_xml
      end
      xml << "</d:dictionary>"

      return xml
    end
Generates xml for Dictionary and Entry objects.

 Returns String.