可以借助Document来实现吧,根据处理结果声称document对象,再转换成xml
response.setContentType("text/xml; charset=UTF-8");然后out。print输出xml格式的