{ "id": "84459", "key": "AC-2873", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2012-01-04T14:35:34.000+0000", "created": "2012-01-04T11:22:46.000+0000", "labels": [ "xml,", "xmlparsing" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:47:49.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": [], "description": "We load a XML feed that has 400+ elements. Each has about 5 child nodes with numbers or a title, not much data.\r\n\r\nLooping over this XML, and converting it to JS randomly causes strange issues.\r\n\r\nFirst we get the element list using xmlDom.documentElement.getElementsByTagName('nodeName'), which works every time.\r\n\r\nThen we loop over those nodes, and for each child, we get the various sub node values we want and convert them to a JS object.\r\n\r\nDuring this loop, the current node value will randomly change from a TiDOMElement to either null, Object or TiDOMNodeList.\r\nNon of these are valid nodes, and thus subsequent node operations fail.\r\n\r\nThe next iteration of the XML list will work fine.\r\n\r\n\r\n\r\nthe function parseXML in the example file is passed the XHR responseXML object.\r\n\r\nIn the retrieveNodeValue( nodeName, xmlNode) method, suddenly one of the calls the xmlNode passed in is null, Object or TiDOMNodeList - Not a NODE. All calls after this in the current loop will be the same,and then the next loop iteration it works fine.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n", "attachment": [ { "id": "24925", "filename": "example.js", "author": { "name": "mattbryson", "key": "mattbryson", "displayName": "Matt Bryson", "active": true, "timeZone": "Europe/London" }, "created": "2012-01-04T11:24:36.000+0000", "size": 1165, "mimeType": "text/javascript" } ], "flagged": false, "summary": "When Parsing large amounts of XML and referencing nodes, randomly a node will either be nulled, or change type!!", "creator": { "name": "mattbryson", "key": "mattbryson", "displayName": "Matt Bryson", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "mattbryson", "key": "mattbryson", "displayName": "Matt Bryson", "active": true, "timeZone": "Europe/London" }, "environment": "OSX Lion\r\nIOS for iPhone (5.0)\r\n\r\nTi SDKs tested 1.8.0.1 RC3 and 1.8.0.1 release.", "comment": { "comments": [ { "id": "178027", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Alan Leard has raised this in TIMOB-6985. Watch that ticket, if this issue is important to you.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2012-01-04T14:34:24.000+0000", "updated": "2012-01-04T14:34:24.000+0000" }, { "id": "281062", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "DUP issue. ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-11-24T22:30:15.000+0000", "updated": "2013-11-24T22:30:15.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }