<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2919.6307" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>I have been working with JDOM beta 5 and have come across a 
peculiar </FONT></DIV>
<DIV><FONT size=2>problem when trying to read in a document, modify it, and 
write it back out.&nbsp; </FONT></DIV>
<DIV><FONT size=2>I cannot get the document to have consistently clean 
formatting.<BR><BR>If I read an XML document with newlines and indentations, add 
new </FONT></DIV>
<DIV><FONT size=2>elements to it, and write it back out, the output will not be 
consistently </FONT></DIV>
<DIV><FONT size=2>formatted.&nbsp; If I the Outputter is instantiated to insert 
newlines and </FONT></DIV>
<DIV><FONT size=2>indentations, the new elements will look right, but the 
previous elements </FONT></DIV>
<DIV><FONT size=2>will now have double newlines and indentations.<BR><BR>On the 
other hand, if the Outputter is instantiated to NOT insert newlines<BR>or 
indentations, the previous elements will look right, indentations.but the<BR>new 
elements won't have any newlines or indentations.<BR><BR>I think what I need is 
a way to read an XML document which has newlines </FONT></DIV>
<DIV><FONT size=2>and indents, and strip all of them out before doing any 
modifications or writing<BR>the document back out.<BR><BR>Has anyone else run 
into this problem or does anyone have a solution?<BR><BR>Thanks,<BR>Rick 
Cannon<BR></FONT><FONT size=2><A 
href="mailto:rick.cannon@jhuapl.edu">rick.cannon@jhuapl.edu</A></FONT></DIV></BODY></HTML>