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 xml output Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "xml output" Watch "xml output" New topic
Author

xml output

shankar vembu
Ranch Hand

Joined: May 10, 2001
Posts: 309
Hi,
How do I send raw xml to the client from my servlet..
I have the xml as Element, i get the servletoutputstream, set the content type as text/xml, but i see no APIs using which i can send this Element.. I would like the client to see the raw xml per se.
Thank you,
Shankar.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Here's an example of how you can print the DOM object into the response stream:


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
shankar vembu
Ranch Hand

Joined: May 10, 2001
Posts: 309
thank you. i am using xalan now.
shankar
 
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: xml output
 
Similar Threads
Ajax application response time
B2B and B2C clients
Printing Raw Request HTML
Axis2 ParseError
How to capture SoapRequest.xml and SoapResponse.xml