我正在尝试从后端获取响应 xml 并在 jQuery 的帮助下在页面上解析它。
代码很简单:
var response = "<Response><SomeElement><FewMoreElement></FewMoreElement><FewMoreElement></FewMoreElement><FewMoreElement></FewMoreElement></SomeElement></Response>";
$.parseXML(response).find("someElement").each(function(searchResp){
//Do something
});