wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes How to aoid overwrite while marshal inside of the for loop Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply locked New topic
Author

How to aoid overwrite while marshal inside of the for loop

Srinivasan Chinnaraj
Greenhorn

Joined: Mar 18, 2013
Posts: 6

I am trying to marshal java object into XML. i want to marshal java object into XML while it inside the for loop.

for(i=0;i<=2;i++){

........................
...........................
...........................

jaxbMarshaller.marshal(details, xmlFile);

}

for the above code it's overwriting in the XML file after completion of each loop . but i want to write in new line after completion of each loop. Please let me know , how to do?
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1075
    
  10

Hi,
I have moved this post to our XML forum where I think you will get better replies.


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9990
    
    7

Like I had requested before please do take some efforts to CarefullyChooseOneForum
Also, do not post the same question multiple times. Let us continue the discussion in your original topic http://www.coderanch.com/t/613980/XML/avoid-overwrite-XML-marshal-mentioned
Did you follow Bill's suggestion?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to aoid overwrite while marshal inside of the for loop
 
Similar Threads
How to avoid overwrite in the XML while marshal mentioned inside of for loop
readObject from Stream till EOF
how to get XML from javaobject using JAXB
Castor trouble
Java JDBC jtable only displaying one record