@Override public void startCounts(final Counts counts, final BufferedWriter out) throws IOException { out.write("<counts "); out.write("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"); out.write("xsi:noNamespaceSchemaLocation=\"http://matsim.org/files/dtd/counts_v1.xsd\"\n"); if (counts.getName() != null) { out.write(" name=\"" + counts.getName() + "\""); } else { out.write(" name=\"\""); } if (counts.getDescription() != null) { out.write(" desc=\"" + counts.getDescription() + "\""); } out.write(" year=\"" + counts.getYear() + "\" "); out.write(" > \n"); }