-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
Parsing a gpx that has two link nodes within the Metadata
Hills
xxx
`/**
-
Search the value of a direct child XML DOM element
-
@param {Element} parent - Parent DOM Element
-
@param {string} needle - Name of the searched element
-
@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;
};`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels