private static void writeLines(final ISourceNode source,
final XMLElement parent) throws IOException {
final int last = source.getLastLine();
for (int nr = source.getFirstLine(); nr <= last; nr++) {
final ILine line = source.getLine(nr);
if (line.getStatus() != ICounter.EMPTY) {
final XMLElement element = parent.element("line");
element.attr("nr", nr);
final ICounter insn = line.getInstructionCounter();
element.attr("mi", insn.getMissedCount());
element.attr("ci", insn.getCoveredCount());
final ICounter branches = line.getBranchCounter();
element.attr("mb", branches.getMissedCount());
element.attr("cb", branches.getCoveredCount());
}
}
}