| Author |
xm file as input for servlet
|
Ayub ali khan
Ranch Hand
Joined: Oct 20, 2005
Posts: 378
|
|
Hi, How can I read a simple xml file using a servlet? Mean while I do some google search if I can find some hints.. Best Regards Ayub
|
SCEA part I,TOGAF Foundation
|
 |
Rahul Bhattacharjee
Ranch Hand
Joined: Nov 29, 2005
Posts: 2300
|
|
|
Read from where , from client or from server itself?
|
Rahul Bhattacharjee
LinkedIn - Blog
|
 |
Ayub ali khan
Ranch Hand
Joined: Oct 20, 2005
Posts: 378
|
|
Hi Rahul, XM file needs to be read from the client as an input stream. I need to genereate back an xml document. I am not sure what processing needs to be done. If I know how to read xml and generate the same xml back, I am good with it. Any useful links on this can be useful. Thank you. Best Regards Ayub.
|
 |
Adeel Ansari
Ranch Hand
Joined: Aug 15, 2004
Posts: 2874
|
|
We are using XStream, DomDriver from thoughtworks xstream, a Java library to serialize/deserialize objects to/from XML. You can find that here
|
 |
Rahul Bhattacharjee
Ranch Hand
Joined: Nov 29, 2005
Posts: 2300
|
|
Still I do not know about the client you are taking about. If that is browser , you can use <input type="file" name="fileName"/> and at the server you can use fileUploader. http://faq.javaranch.com/view?FileUpload
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12271
|
|
How about working through the Sun tutorial on XML processing. Creating a Document object from any InputStream is pretty simple, here is an example:
|
Java Resources at www.wbrogden.com
|
 |
Ayub ali khan
Ranch Hand
Joined: Oct 20, 2005
Posts: 378
|
|
Hi William, Thanks for a cool code and the link !! While I was searching for info on XML I cam across the JDOM parser. I need some inputs on this, will post the query in the XML forum. Thanks for your wonderful answer!! Best Regards Ayub.
|
 |
 |
|
|
subject: xm file as input for servlet
|
|
|