private void addClasses(Document doc, Set<? extends Coverable> files, Element classesElement) {
        for (Coverable file : files) {
            Element classElement = doc.createElement("class");
            classesElement.appendChild(classElement);
            classElement.setAttribute("name", file.getUri());
            classElement.setAttribute("filename", file.getUri().substring(1));
            classElement.setAttribute("line-rate", "" + file.getLineCoverRate());
            classElement.setAttribute("branch-rate", "" + file.getBranchRate());
            classElement.setAttribute("complexity", "0");

            classElement.appendChild(doc.createElement("methods"));
            Element linesElement = doc.createElement("lines");
            classElement.appendChild(linesElement);
            FileData fileData = (FileData) file;
            addLines(doc, linesElement, fileData);
        }
    }