Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using servlets

 
Sri Sar
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i am developing a simple application where i need to use XML.
using HTML, i have created a form where the user can make selections. now, i need to use a server-side scripting language to generate a XML file that captures the user selections ie the XML file should be dynamic and the selections done by the user should be reflected in the XML file.
my boss has asked me to use only servlets or JSP to generate this XML. i need ur assistance in this regard. any links on a similar functionality will be of great help.
thanks in advance
 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use DOM(Document Object Model) API for this purpose. You can find the tutorials and help from http://java.sun.com.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would start by making a mockup of what the resulting XML document file is supposed to look like. Then consider where each of the content elements is supposed to come from. You will probably then be able to come up with the sequence of statements needed to open a file and write a document where the fixed elements are constants in your program and the variable elements are extracted from the form.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic