File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes How to display XML data by servlet on browser ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to display XML data by servlet on browser ?" Watch "How to display XML data by servlet on browser ?" New topic
Author

How to display XML data by servlet on browser ?

Nr Java
Greenhorn

Joined: Aug 10, 2009
Posts: 9
Hi
I want to read xml data and store in string and display on browser? I am able to display XML form please help me .
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

OK. What have you done so far? Where are you stuck?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9302
    
  17

Hi Nemee, welcome to javaranch.

I want to read xml data


Do you want to read it from a file on the server or what??


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Nr Java
Greenhorn

Joined: Aug 10, 2009
Posts: 9
I am reading XML from another server side and i have to create an object for .
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

Nemee Ram wrote:I am reading XML from another server side and i have to create an object for .


If you manage to write more than a one line problem description we might be able to help your better

[EDIT]

enabled BB code for the quote


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Nr Java
Greenhorn

Joined: Aug 10, 2009
Posts: 9
Deepak Bala wrote:
Nemee Ram wrote:I am reading XML from another server side and i have to create an object for .


If you manage to write more than a one line problem description we might be able to help your better

I am able to read XML from other server ... and displaying XML on browser ( ((XML = reader.readLine()) != null) ) and parsing it while (tokenizer.hasMoreElements()) {
String token = tokenizer.nextToken();


String status = token;

writer.println("<br>");

writer.println(status);

I have to store XML data on pojo and create an object to use for another purpose..
PLease help me how to do ??

Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

Browsers are capable of handling XML data by applying their own CSS to it. Simply pass the XML to the browser and set the appropriate MIME type
Nr Java
Greenhorn

Joined: Aug 10, 2009
Posts: 9
Thanks for reply i done it myself ....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to display XML data by servlet on browser ?