Xml Parsing
The aim of this assignment is to connect to openweathermaps.org API using an ajax request, to get the XML format weather forecast and display it on a web page to make it easier for the user to read. The user types in the name of the city they want and the weather information is then displayed on a table. The user will also be able to see the graph/chart of the weather for that day. I will be using JavaScript to implement my requests and displaying it on the web page using HTML and I will be styling the web page using CSS . This application can be used by different people who want to know the weather forecast.
The function within my JavaScript code which initiates the AJAX call is name .This function begins by initializing the HttpRequest object and setting it equal to a variable name “xhr”. This sets up the communication between the client and the server. We then listen for a change in the HttpRequest object. If the HttpRequest object has changed then the AJAX needs to update to the new state of the object to which we pass the state to another method for formatting of the data.
This assignment helped me in implementing my knowledge of what I have learned about Html, CSS and AJAX. Also with the help of this assignment I learned to use the API in real life scenario. This assignment helped me to refresh my skills and I enjoyed this assignment and hope to build more assignments like this this will help me in future assignments and other projects.