I'm trying to read XML with AJAX, all the data are took from a well formed XML file and then are sended to client page through AJAX. But xmlhttp.responseXML always remains unusable.
Here's my controller :
def fileGetter = {
if (params.fileId) {
try {
String resultStr = fileManipulatorService.fileProvider(params.fileId).getText()
println resultStr
render(text: resultStr, contentType: "text/xml", encoding: "ISO-8859-1")
response.sendError(200)
}
}
}
resultStr
contains the proper xml, on my webpage xmlhttp response text contains the correct xml data too while xmlhttp response xml contains nothing. How can I send true xml data to my client page and exploit it? I need too work with an XML response. (I tried to send a new xml object created from the string, I tried to return the original file, but none of these methods worked)
(I'm using Chrome)
Thank you