Skip to content
Permalink
Browse files
switch to XMLUtils. If we need XMLSerializer, we will need to check t…
…he license and then download it during builds
  • Loading branch information
aharui committed May 1, 2014
1 parent ac458b5 commit 5f7c8cf6a8be4fa8a23ea86b11b8bee6eebbbd21
Showing 1 changed file with 3 additions and 2 deletions.
@@ -235,21 +235,22 @@ public void writeXMLToFile(Document doc, String filename) {
*/

// Alternative #2 - everything on its own line including text. Some extra spaces. Looks strange.
/*
XMLUtils.PrettyDocumentToWriter(doc, fileWriter);
fileWriter.close();
*/



// Alternative #3 - but without setPreserveSpace() it's all bunched together and
// with setPreserveSpace() it's the same as the original.
/*
OutputFormat format = new OutputFormat(doc);
format.setLineWidth(65);
format.setIndenting(true);
format.setIndent(2);
//format.setPreserveSpace();
org.apache.xml.serialize.XMLSerializer serializer = new XMLSerializer(fileWriter, format);
serializer.serialize(doc);
*/

} catch (FileNotFoundException fnf) {
System.out.println("FILE NOT FOUND!!!" + filename);

0 comments on commit 5f7c8cf

Please sign in to comment.