Im not an experienced with XML but trying to create a website and need to use some weather data from a norwegian weather services (yr.no) specific this url(https://www.yr.no/sted/Norge/Akershus/B%C3%A6rum/Kols%C3%A5s/varsel.xml)
I have tried using this code under, but having a problem having a problem.. where can i go from here?
fetch('https://www.yr.no/sted/Norge/Akershus/Bærum/Kolsås/varsel.xml', {
mode: 'no-cors'
})
.then(function(resp) {
return resp.text();
})
.then(function(data) {
let parser = new DOMParser(),
xmlDOc = parser.parseFromString(data, '/sted/Norge/Akershus/Bærum/Kolsås/varsel.xml'
);
console.log(xmlDOc);
});