Actual Behavior
On XML parse, using the "getElementsByTagName" android throws an error:
Uncaught TypeError: Object function getDocumentElement() {[native code]}
Expected Behavior
To parse the XML successfully , just as on iOS
Test Case
request = Ti.Network.createHTTPClient({ timeout:9000 });
request.onload = function() {
var content = this.responseXML.getDocumentElement.getElementsByTagName("smart-phones").item(0);
Ti.API.error('content: '+content);
var upfrontContent = {
title:content.getElementsByTagName("promote-title").item(0).text,
img: content.getElementsByTagName("promote-image-url").item(0).text,
desc: content.getElementsByTagName("promote-desc").item(0).text,
pdf: content.getElementsByTagName("download-url").item(0).text
};
Ti.API.error('upfrontContent things: title: '+upfrontContent.title+' img:'+upfrontContent.img+' desc:'+upfrontContent.desc);
};
request.onerror = function() {
Ti.API.error('ERROR!!!');
};
request.open('GET', URL);
request.send(null);
Closing ticket as invalid with reference to the above comments.