{ "id": "90773", "key": "TIMOB-8866", "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": "2012-04-27T04:26:29.000+0000", "created": "2012-04-23T15:44:28.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [ { "id": "13270", "description": "Release 1.8 Service Pack 3 (CI for 1_8_X)", "name": "Release 1.8.3", "archived": true, "released": false } ], "issuelinks": [], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-24T18:11:06.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h3. Actual Behavior\r\nOn XML parse, using the \"getElementsByTagName\" android throws an error:\r\n{code}\r\nUncaught TypeError: Object function getDocumentElement() {[native code]}\r\n{code}\r\n\r\nh3. Expected Behavior\r\nTo parse the XML successfully , just as on iOS\r\n\r\nh3. Test Case\r\n{code:title=app.js|borderStyle=solid}\r\nrequest = Ti.Network.createHTTPClient({ timeout:9000 });\r\n\r\nrequest.onload = function() {\r\n\tvar content = this.responseXML.getDocumentElement.getElementsByTagName(\"smart-phones\").item(0);\r\n\tTi.API.error('content: '+content);\r\n\tvar upfrontContent = {\r\n\t\ttitle:content.getElementsByTagName(\"promote-title\").item(0).text,\r\n\t\timg: content.getElementsByTagName(\"promote-image-url\").item(0).text,\r\n\t\tdesc: content.getElementsByTagName(\"promote-desc\").item(0).text,\r\n\t\tpdf: content.getElementsByTagName(\"download-url\").item(0).text \r\n\t};\r\n\tTi.API.error('upfrontContent things: title: '+upfrontContent.title+' img:'+upfrontContent.img+' desc:'+upfrontContent.desc);\t\t\t\t\t\t\r\n};\r\nrequest.onerror = function() {\t\t\t\t\t\r\n\tTi.API.error('ERROR!!!');\r\n};\r\n\trequest.open('GET', URL);\r\n\trequest.send(null);\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: XML parse throws an error getDocumentElement() has no method getElementsByTagName ", "creator": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "subtasks": [], "reporter": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "environment": "Titanium Studio, build: 2.0.1.201204132053\r\nMac OSX: 10.7.2\r\nAndroid Simulator: 2.3.3\r\nAndroid Handheld device: 2.2\r\nAndroid Handheld device: 2.3.4\r\nTitanium SDK: 1.8.X", "comment": { "comments": [ { "id": "415635", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-24T18:11:06.000+0000", "updated": "2017-03-24T18:11:06.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }