<!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.3315.2870" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi friends of XML¡¡</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I have a problem in my application. I use a
javabean to merge,copy,save xml files....and the problem is :</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> I have a JSP page that uses this
javabean and create/save an xml file correctly, but the same java code and the
same javabean in a separate Java application(stand alone JAVA application)
don't saves/writes the file correctly. When i try to open the xml file with
Internet explorer gives me an error because the file is cutted. And
it's strange that if I send the file to the System.out the
file seemingly correctly and complete.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> What can be my
problem??</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>The code of the function that writes/saves the
xml file is ......</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><STRONG><FONT face=Arial size=2>public boolean SaveXML(String file,Document
doc) throws IOException{<BR> </FONT></STRONG></DIV>
<DIV><STRONG><FONT face=Arial
size=2> FileWriter writer = new
FileWriter(file);<BR>
XMLOutputter outputter = new XMLOutputter("
",true);<BR> </FONT></STRONG></DIV>
<DIV><STRONG><FONT color=#00ff00 face=Arial
size=2> <FONT
color=#0000ff>// outputter.output(doc, System.out); In the java
program shows correctly the file in the Dos Window</FONT></FONT></STRONG></DIV>
<DIV><STRONG><FONT color=#0000ff face=Arial
size=2> </FONT></STRONG></DIV>
<DIV><STRONG><FONT face=Arial
size=2> <FONT
color=#ff0000>outputter.output(doc, writer); </FONT></FONT></STRONG></DIV>
<DIV><STRONG><FONT face=Arial
size=2> // In JSP run OK and
create the file and in Java application cut the file but
</FONT></STRONG></DIV>
<DIV><STRONG><FONT face=Arial size=2> //
don't throws an </FONT><FONT face=Arial
size=2></STRONG><STRONG>exception<BR> </STRONG></FONT><FONT
face=Arial
size=2><STRONG> <BR> return
true;<BR> <BR> }</STRONG></FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><PRE style="FONT-SIZE: 10pt; FONT-STYLE: normal; FONT-VARIANT: normal; FONT-WEIGHT: normal; LINE-HEIGHT: 12pt"> </PRE><PRE style="FONT-SIZE: 10pt; FONT-STYLE: normal; FONT-VARIANT: normal; FONT-WEIGHT: normal; LINE-HEIGHT: 12pt"> </PRE></FONT></DIV></BODY></HTML>