code: private Document toXML(Collection<ArchiveEntry> files) throws Exception
      {
          Document doc = new DOMDocument();
  
          Element packageElement = new DOMElement("package");
          doc.setRootElement(packageElement);
  
          Element infoElement = new DOMElement("infos");
          packageElement.add(infoElement);
          addInfoElements(infoElement);
  
          Element filesElement = new DOMElement(FILES_TAG);
          packageElement.add(filesElement);
          addFileElements(files, filesElement);
  
          return doc;
      }
docs: Generate a DOM4J Document containing the generated XML.
  
  @param files the list of files that we want to include in the generated package XML file.
  @return the DOM4J Document containing the generated XML