Results 1 to 1 of 1
Thread: write in a text file at the end
- 02-06-2011, 05:56 PM #1
Member
- Join Date
- Mar 2010
- Posts
- 11
- Rep Power
- 0
write in a text file at the end
hi ,
i am trying to add multiple DOMs to a xml File :
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
DOMSource source = new DOMSource(document);
// Prepare the output file
Result result = new StreamResult(fileout);
// Write the DOM document to the file
Transformer xformer = TransformerFactory.newInstance().newTransformer();
xformer.transform(source, result);
transformer.transform(source, result);
but the result is everytime the last source is written and the old one are erased.
thanks
Similar Threads
-
Write a program that sorts data from a text file and sort them in a file
By danmgz45 in forum New To JavaReplies: 6Last Post: 12-01-2010, 06:31 AM -
How to write text file into Array
By venkat.ravala in forum New To JavaReplies: 13Last Post: 11-19-2009, 05:59 PM -
How to write a string middle of a text file?
By loggen in forum New To JavaReplies: 5Last Post: 12-19-2008, 09:48 AM -
Write a List into a Text file
By tech2000 in forum New To JavaReplies: 1Last Post: 11-13-2008, 06:09 AM -
how do i write to a text file from an arraylist?
By otoro_java in forum New To JavaReplies: 3Last Post: 01-30-2008, 07:53 AM
Bookmarks