public void createDocuments(List<Pair<String, Document>> pathContents) throws IOException { for (Pair<String, Document> pathContent : pathContents) { OutputFormat format = OutputFormat.createPrettyPrint(); format.setSuppressDeclaration(false); StringBuilderWriter writer = new StringBuilderWriter(1024); XMLWriter xmlWriter = new XMLWriter(writer, format); xmlWriter.write(pathContent.getSecond()); xmlWriter.flush(); writer.close(); createDocument(pathContent.getFirst(), writer.toString()); } }
public void createDocuments(List<Pair<String, Document>> pathContents) throws IOException { for (Pair<String, Document> pathContent : pathContents) { OutputFormat format = OutputFormat.createPrettyPrint(); format.setSuppressDeclaration(false); StringBuilderWriter writer = new StringBuilderWriter(1024); XMLWriter xmlWriter = new XMLWriter(writer, format); xmlWriter.write(pathContent.getSecond()); xmlWriter.flush(); writer.close(); createDocument(pathContent.getFirst(), writer.toString()); } }
public void createDocuments(List<Pair<String, Document>> pathContents) throws IOException { for (Pair<String, Document> pathContent : pathContents) { OutputFormat format = OutputFormat.createPrettyPrint(); format.setSuppressDeclaration(false); StringBuilderWriter writer = new StringBuilderWriter(1024); XMLWriter xmlWriter = new XMLWriter(writer, format); xmlWriter.write(pathContent.getSecond()); xmlWriter.flush(); writer.close(); createDocument(pathContent.getFirst(), writer.toString()); } }