Open dwploc opened 2 years ago
Parsing a gpx that has two link nodes within the Metadata
`/**
@return {} The element value */ gpxParser.prototype.queryDirectSelector = function(parent, needle) {
let elements = parent.querySelectorAll(needle); let finalElem = elements[0];
if(elements.length > 1) { let directChilds = parent.childNodes;
for(idx in directChilds) { <--- idx is undefined. elem = directChilds[idx]; if(elem.tagName === needle) { finalElem = elem; } }
}
return finalElem; };`
Parsing a gpx that has two link nodes within the Metadata
`/**
@return {} The element value */ gpxParser.prototype.queryDirectSelector = function(parent, needle) {
let elements = parent.querySelectorAll(needle); let finalElem = elements[0];
if(elements.length > 1) { let directChilds = parent.childNodes;
}
return finalElem; };`