This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "using servlets" Watch "using servlets" New topic
Author

using servlets

Sri Sar
Ranch Hand

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

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 http://java.sun.com.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12756
    
    5
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
 
Don't get me started about those stupid light bulbs.
 
subject: using servlets
 
Similar Threads
creating XML from Beans
is this possible in XML?
how to use XML here?
JSP and XML
generating XML using servlets/jsp