'Displaying weather information for multiple cities in XML mode

I am learning API using openweathermap

I tried something like this to get the information of multiple cities using JSON and it worked:

  xhttp.open("GET", "http://api.openweathermap.org/data/2.5/group?id=5894171,6167865&appid=1863e1cddf9f167c359054a40a64c6a7&units=imperial", true);

I am trying something like this for the XML but it's not working:

  xhttp.open("GET", "http://api.openweathermap.org/data/2.5/group?id=5894171,6167865&appid=1863e1cddf9f167c359054a40a64c6a7&mode=xml", true);

Any help is appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source