{ "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:
\nvar xhr = Titanium.Network.createHTTPClient();
\nxhr.onload = function(){
\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();
\nThe 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.
I'm using Titanium Mobile SDK 1.6.0.
\nRegards,
\nZhigang Xu