Problem description
Trying to get from an HttpClient call a big anmount of XML data fails with Out of Memory error.
Steps to reproduce
Using an xhr request, get a big xml file (tested on Emulator with ~6MB). The following code will show the problem:
var xhrDocument = Ti.Network.createHTTPClient({
onload: function() {
var ResponseXML = xhrDocument.getResponseXML();
var ResponseData = ResponseXML.getElementsByTagName('GetDocResult').item(0).text;
var decodeData = Ti.Utils.base64decode(ResponseData);
alert('Done');
}
});
xhrDocument.open('GET', 'test.xml');
xhrDocument.send();
Workaround provided
Closing ticket as the issue will not fix and with reference to the above comments. A workaround is provided above.