• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to create an XML document from a form

 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a servlet that handles a form action from a JSP file. What I want to do is to create (update - append) an XML document using the form values. Does anyone know how to do it? is there any open source class that I can use?
thanks
 
Satish Gopalakrishnan
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see any replies to your question but were u able to find any such open source code. If so , can you please share the knowledge
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For XML creation I have a simple XMLWriter class that I developed myself. For more complex import/export, there's the Castor beans classes (http://www.castor.org). Also the latest reference implementation at http://xml.apache.org (xerces) adds a writer capability to the DOM model.
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Tim.
Satish, I haven't found anything besides what Tim suggested. I was thinking of using.
PrintWriter outFile=new PrintWriter (new FileWriter....
For the time being, I only need to store the info, so I think this should work
cheers
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic