[jdom-interest] Servlet sample

Jason Hunter jhunter at collab.net
Tue Sep 5 14:56:59 PDT 2000


> Could anyone furnish a sample servlet that takes an XML string in 
> the body of a post and parses it? 

Use the normal SAXBuilder but use req.getInputStream() as the input
stream.

> All I'm looking to do is traverse the doc and modify and attribute and
> add an element or two then send the XML back. 

Use the normal XMLOutputter but pass res.getWriter() as the writer.

-jh-



More information about the jdom-interest mailing list