{ "id": "64150", "key": "TIMOB-3518", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-05-01T20:40:47.000+0000", "created": "2011-04-15T03:46:12.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-05-02T21:34:24.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

The following code snippet is a much simplified version of\nxml_rss.js from KitchenSink:

\n

var xhr = Titanium.Network.createHTTPClient();

\n

xhr.onload = function(){

\n
\ntry {\n    var doc = this.responseXML.documentElement;\n    //      var anXml = Ti.XML.parseString(this.responseText);\n    //      var doc = anXml.documentElement;\n\n    var rootElem = doc.getElementsByTagName(\"rss\");\n    Ti.API.info(\"rootElem array:\" + rootElem.length);\n    Ti.API.info(\"rootElem Text:\" + rootElem.item(0).getText());\n\n} \ncatch (e) {\n    alert(e);\n}\n
\n

}

\n

// open the client xhr.open('GET','http://v2.0.news.tmg.s3.amazonaws.com/feeds/news.xml');

\n

// send the data xhr.send();

\n

The service URL is the same one used in xml_rss.js. The root\nelement tag of the return XML message is \"rss\". In my code, the\ncall
\nvar rootElem = doc.getElementsByTagName(\"rss\");
\nresults in an empty array rootElem for both Android Emulator and\nactual Android device. The same code runs fine on IPhone, which\nreturns an array with a single element.

\n

I'm using Titanium Mobile SDK 1.6.0.

\n

Regards,

\n

Zhigang Xu

{html}", "attachment": [], "flagged": false, "summary": "Android: Attempt to retrieve root element from XML returns null object", "creator": { "name": "zhigangxu", "key": "zhigangxu", "displayName": "Zhigang Xu", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "zhigangxu", "key": "zhigangxu", "displayName": "Zhigang Xu", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "418383", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Resolving ticket as invalid as this version of Kitchen Sink is no longer supported.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-05-01T20:40:47.000+0000", "updated": "2017-05-01T20:40:47.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }