This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Servlets and the fly likes using servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "using servlets" Watch "using servlets" New topic

using servlets

Sri Sar
Ranch Hand

Joined: Mar 25, 2004
Posts: 44
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

Joined: Mar 18, 2004
Posts: 572
You can use DOM(Document Object Model) API for this purpose. You can find the tutorials and help from
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
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.
I agree. Here's the link:
subject: using servlets
It's not a secret anymore!