[AC-2873] When Parsing large amounts of XML and referencing nodes, randomly a node will either be nulled, or change type!!
GitHub Issue | n/a |
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2012-01-04T14:35:34.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | xml,, xmlparsing |
Reporter | Matt Bryson |
Assignee | Mauro Parra-Miranda |
Created | 2012-01-04T11:22:46.000+0000 |
Updated | 2016-03-08T07:47:49.000+0000 |
Description
We load a XML feed that has 400+ elements. Each has about 5 child nodes with numbers or a title, not much data.
Looping over this XML, and converting it to JS randomly causes strange issues.
First we get the element list using xmlDom.documentElement.getElementsByTagName('nodeName'), which works every time.
Then 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.
During this loop, the current node value will randomly change from a TiDOMElement to either null, Object or TiDOMNodeList.
Non of these are valid nodes, and thus subsequent node operations fail.
The next iteration of the XML list will work fine.
the function parseXML in the example file is passed the XHR responseXML object.
In 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.
Attachments
File | Date | Size |
example.js | 2012-01-04T11:24:36.000+0000 | 1165 |
Alan Leard has raised this in TIMOB-6985. Watch that ticket, if this issue is important to you.
DUP issue.