Last active
May 18, 2017 11:36
-
-
Save felipem775/95ce0f9d7b295d247e7f51bfd41748be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Return ihwrfhib/bimep/bimep_2017051700.nc | |
function get_latest(url) { | |
return fetch(url) | |
.then(response => response.text()).then(str => (new window.DOMParser()).parseFromString(str, "text/xml")) | |
.then(function (xml){ | |
return xml.getElementsByName('Latest bimep')[0].attributes['urlPath'].value; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment