Reading String output into a xmlFile..

Hi, When i am getting output as a big string but it is a xml file. I want to save that string as xml file in the program it self. any sugessionsthanks
[198 byte] By [sumanth_kumar] at [2007-9-26 3:23:23]
# 1
Hi,create a Document with your String (you can use the DOMBuilder of Xalan) then use SerializeToXML (Xalan) to get XML file using serialize method.Hope this helps.
gentyt at 2007-6-29 11:41:55 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

If I'm understanding you correctly, you can only get an XMLDocument, and not a string containing the xml to write to a file.

Here's what I do.

XMLDocument doc = .....

ByteArrayOutputStream baos =

new ByteArrayOutputStream();

doc.print(baos);

String text = baos.toString();

Good Luck!

dvb

Brunky at 2007-6-29 11:41:55 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...