Bookmark Topic Watch Topic
  • New Topic

How to aoid overwrite while marshal inside of the for loop

 
Srinivasan Chinnaraj
Greenhorn
Posts: 6
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 1101
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,
I have moved this post to our XML forum where I think you will get better replies.
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
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?
 
    Bookmark Topic Watch Topic
  • New Topic