87,901
社区成员
发帖
与我相关
我的任务
分享
var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("microsoft.xmlhttp");
xhr.open('get', URL, false);
xhr.send(null);
var xmlDoc = xhr.responseXML;
String str = XML格式的字符串
//==========设置响应头content-type为text/xml的代码。。java不会,自己写
response.getWrite().print(str);
response.getWrite().flush();
response.getWrite().close();