{ "id": "62384", "key": "TIMOB-1752", "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-08-20T16:18:35.000+0000", "created": "2011-04-15T03:01:21.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "childnodes", "domnode", "domnodelist", "haschilds", "length", "ti.domnodelist", "xml" ], "versions": [], "issuelinks": [ { "id": "20046", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "94532", "key": "TIMOB-9901", "fields": { "summary": "TiAPI: Review and clean up platform bugs and reduce bug count by 20%.", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T23:35:15.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": "{html}

Hello,

\n

I'm using the childNodes property for iPhone and Android. On\niPhone, it works fine and return the children nodes correctly. But,\non Android, it returns something very strange. According DOMNode\ndocumentation to childNodes property: \"Returns a DOMNodeList that\ncontains all children of this node. If there are no children, this\nis an empty DOMNodeList\". You can see the Ti.DOMNodeList object for\nboth (android and iPhone) but if you call childNodes.length on\nAndroid it returns a \"magic\" number different of the real number of\nchildrens that is returned properly on iPhone. In other words, on\niPhone is everything fine, on Android the childNodes property\ndoesn't works properly.

\n

Regards.

{html}", "attachment": [], "flagged": false, "summary": "ChildNodes for Android", "creator": { "name": "gilliardlopes", "key": "gilliardlopes", "displayName": "Gilliard Lopes", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "gilliardlopes", "key": "gilliardlopes", "displayName": "Gilliard Lopes", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "126548", "author": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Gilliard, is this simply because on Android the parsed DOM tree\nincludes whitespace which appears to be stripped out by the parsing\non iPhone?

\n

Please go ahead and iterate over the nodes and check what they\nare. You should find the same element nodes on both systems.\n(childNodes DOES NOT only include elements! It also\nincludes text nodes, comment nodes, etc.)

{html}", "updateAuthor": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:01:22.000+0000", "updated": "2011-04-15T03:01:22.000+0000" }, { "id": "126549", "author": { "name": "gilliardlopes", "key": "gilliardlopes", "displayName": "Gilliard Lopes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Hum, i understand what you said. I tested in my app and\nconfirmed your affirmative.
\nThanks for the help!!

\n

Regards.

{html}", "updateAuthor": { "name": "gilliardlopes", "key": "gilliardlopes", "displayName": "Gilliard Lopes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:01:22.000+0000", "updated": "2011-04-15T03:01:22.000+0000" }, { "id": "215237", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "No test case, ticket marked as invalid. ", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-08-20T16:18:35.000+0000", "updated": "2012-08-20T16:18:35.000+0000" }, { "id": "215266", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It appears that it was a whitespace issue and not a platform issue. Please reopen this ticket if you can provide a test case or better description to reproduce this issue.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-20T19:31:19.000+0000", "updated": "2012-08-20T19:31:19.000+0000" }, { "id": "411061", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T23:35:15.000+0000", "updated": "2017-03-09T23:35:15.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }