Skip to content

Commit 0d20736

Browse files
committed
make document output pretty printed
1 parent 55cb9a1 commit 0d20736

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/org/openarchives/resourcesync/ResourceSyncDocument.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import org.jdom2.Document;
44
import org.jdom2.Element;
5+
import org.jdom2.output.Format;
56
import org.jdom2.output.XMLOutputter;
67

78
import java.io.IOException;
@@ -120,7 +121,7 @@ public String serialise()
120121
{
121122
Element element = this.getElement();
122123
Document doc = new Document(element);
123-
XMLOutputter out = new XMLOutputter();
124+
XMLOutputter out = new XMLOutputter(Format.getPrettyFormat());
124125
return out.outputString(doc);
125126
}
126127

@@ -129,7 +130,7 @@ public void serialise(OutputStream out)
129130
{
130131
Element element = this.getElement();
131132
Document doc = new Document(element);
132-
XMLOutputter xmlOutputter = new XMLOutputter();
133+
XMLOutputter xmlOutputter = new XMLOutputter(Format.getPrettyFormat());
133134
xmlOutputter.output(doc, out);
134135
}
135136
}

0 commit comments

Comments
 (0)