aspose file tools*
The moose likes Servlets and the fly likes xml output Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
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
 
Don't get me started about those stupid light bulbs.
 
subject: xml output