title: How to fetch XML with fetch api
body: <p>I'm trying to making a weather app that displays the weather and the temperature of many days of the week. I'm currently using openweathermap api for such task, the thing is that the information that I want (that is the date of the weather) only comes in xml format.
  Since I'm rebuilding it in ES6(ES2015) for academic reasons I wanted to also use the fetch api but since the fetch method parses it, it just delivers an error.
  so how can i fetch it or mby there is a better way to do it.</p>
  
  <pre><code>let apis = {
      currentWeather: { //get user selected recomendation weather
          api:"http://api.openweathermap.org/data/2.5/forecast/daily?lat=",
          parameters: "&amp;mode=xml&amp;units=metric&amp;cnt=6&amp;APPID=/*api key*/",
          url: (lat, lon) =&gt; {
              return apis.currentWeather.api + lat + "&amp;lon=" + lon +
                     apis.currentWeather.parameters
          }
      }
  };
  function getCurrentLoc() { 
      return new Promise((resolve, reject) =&gt;  navigator.geolocation
                                               .getCurrentPosition(resolve, reject))
  }
  function getCurrentCity(location) {
      const lat = location.coords.latitude;
      const lon = location.coords.longitude;
      return fetch(apis.currentWeather.url(lat, lon))
      .then(response =&gt; response.json())
      .then(data =&gt; console.log(data))
  }
  getCurrentLoc()
  .then( coords =&gt; getCurrentCity(coords))
  </code></pre>