{ "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,
\nI'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.
\nRegards.
Gilliard, is this simply because on Android the parsed DOM tree\nincludes whitespace which appears to be stripped out by the parsing\non iPhone?
\nPlease 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.)
Hum, i understand what you said. I tested in my app and\nconfirmed your affirmative.
\nThanks for the help!!
Regards.