I've started programming with Javascript only a few days ago.
I need to open a .xml file, read some of the tags in there and store them in an array.
I'v tried with the fetch function (even if I don't understand how it works):
fetch('fileName.xml')
.then(function (response) {
console.log(response);
return response.json();
})
.then(function (data) {
//do what you want
});
I think this is the right structure for the code, but I don't know hot to continue. How can I read some of the tags in my file?
Thank you in advance for you answers!
ps: I'm programming on browser