Page js code
url : '...',
type : 'POST',
dataType : 'xml',
error : function(xml) {
alert("Error loading XML document" xml);
},
success: function(xml) {
$(xml).find("X").each(function(i) {
alert($(this). attr("Xattr"));
});
}
});
response.setContentType("text/xml; charset=utf-8");
response.setCharacterEncoding("utf-8");
PrintWriter pw = response.getWriter();
Document doc = new Document();//Get XML file
doc.write(pw);
return null;
}