This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
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
Register / Login


JavaRanch » Java Forums » Java » Servlets
Reply 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
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9191
    
    2

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: 6601
    
    1

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 - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
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: 6601
    
    1

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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to display XML data by servlet on browser ?
 
Similar Threads
C++ Server + Web Client
xml and dtd
how do i write xml in to file by using jsp
C++ Server + Web Client
C++ Server + Web Client