{ "id": "150832", "key": "TIMOB-19436", "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": "2015-09-08T03:08:57.000+0000", "created": "2015-08-31T02:53:47.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2015-09-08T03:08:57.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": "h6.Reproduce Step:\r\n1. Simply run the following code in a default project.\r\n{code}\r\nvar response= '';\r\nresponse += '';\r\nresponse += '';\r\nresponse += ''; \r\nresponse += '1';\r\nresponse += 'Dubai';\r\nresponse += 'دبي';\r\nresponse += '';\r\nresponse += ''; \r\nresponse += '2'; \r\nresponse += 'Abu Dhabi'; \r\nresponse += 'أبوظبي'; \r\nresponse += ''; \r\nresponse += ''; \r\nresponse += '3'; \r\nresponse += 'Sharjah'; \r\nresponse += 'الشارقة'; \r\nresponse += ''; \r\nresponse += ''; \r\nresponse += '4'; \r\nresponse += 'Al Ain';\r\nresponse += 'العين';\r\nresponse += '';\r\nresponse += '';\r\nresponse += '5';\r\nresponse += 'Ras al-Khaimah';\r\nresponse += 'راس الخيمه';\r\nresponse += '';\r\nresponse += ''; \r\nresponse += '';\r\n\r\nvar result = Ti.XML.parseString(response); \r\nTi.API.info(result);\r\n\r\nvar rootNode = result.getElementsByTagName(\"EmiratenameEn\"); \r\nTi.API.info('emirates list length==>> ' + rootNode.length); \r\n{code}\r\n\r\nh6.Expect Result:\r\nThe XML tag should be recongise.\r\n\r\nh6.Actual Result:\r\nOn android, the tag can't be recongised. But on iOS, it works well.\r\n\r\nh6.Note:\r\nIf using full tag name with namespace (ns1:EmiratenameEn), it will work well. \r\nBut this XML is a response from httpClient, the namespace is changing every time.", "attachment": [], "flagged": false, "summary": "Android: Ti.XML.parseString() did not recognise tag name without namespace ", "creator": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "subtasks": [], "reporter": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "environment": "Ti SDK 4.1.0.GA\r\niOS 8.4\r\nAndroid 4.2.2", "closedSprints": [ { "id": 481, "state": "closed", "name": "2015 Sprint 18 SDK", "startDate": "2015-08-29T00:30:25.440Z", "endDate": "2015-09-12T00:30:00.000Z", "completeDate": "2015-09-14T05:24:05.135Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "362259", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "There's this method, http://docs.appcelerator.com/platform/latest/#!/api/Titanium.XML.Document-method-getElementsByTagNameNS that does search with namespaces.\r\n\r\nYou can use:\r\n{code}\r\nvar rootNode = result.getElementsByTagNameNS(\"*\",\"EmiratenameEn\"); \r\n{code}\r\nIn android to get this to work.\r\n\r\nFull code would be:\r\n{code}\r\nvar response= '';\r\nresponse += '';\r\nresponse += '';\r\nresponse += ''; \r\nresponse += '1';\r\nresponse += 'Dubai';\r\nresponse += 'دبي';\r\nresponse += '';\r\nresponse += ''; \r\nresponse += '2'; \r\nresponse += 'Abu Dhabi'; \r\nresponse += 'أبوظبي'; \r\nresponse += ''; \r\nresponse += ''; \r\nresponse += '3'; \r\nresponse += 'Sharjah'; \r\nresponse += 'الشارقة'; \r\nresponse += ''; \r\nresponse += ''; \r\nresponse += '4'; \r\nresponse += 'Al Ain';\r\nresponse += 'العين';\r\nresponse += '';\r\nresponse += '';\r\nresponse += '5';\r\nresponse += 'Ras al-Khaimah';\r\nresponse += 'راس الخيمه';\r\nresponse += '';\r\nresponse += ''; \r\nresponse += '';\r\n \r\nvar result = Ti.XML.parseString(response); \r\nTi.API.info(result);\r\n \r\nvar rootNode = result.getElementsByTagNameNS(\"*\",\"EmiratenameEn\"); \r\nTi.API.info('emirates list length==>> ' + rootNode.length); \r\n{code}\r\n\r\n[~sliang] If this solves the issue, I'll resolve this ticket.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-09-04T03:45:19.000+0000", "updated": "2015-09-04T03:45:19.000+0000" }, { "id": "362265", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "It works for me, and now waiting for customer's reply. Thanks a lot. [~msamah]", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2015-09-04T04:56:21.000+0000", "updated": "2015-09-04T04:56:21.000+0000" }, { "id": "362463", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Closing this as invalid.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-09-08T03:08:46.000+0000", "updated": "2015-09-08T03:08:46.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }