Remember that last week I had you add two empty tables to you HTML file that we were going to use to house our return data. We had one for the XML and one for the JSON (seen below). Today, we are going to start moving away from the XML data structure. You will see as we start to use JSON, how much easier and cleaner it is than dealing with XML. One of the main reasons for this, is that XML is less standardized. Meaning, the data you want may be an attribute of a tag, or the inner HTML of the tag. It really depends on who is controlling the data and their preferences. JSON is more standardized, in that you have objects, and these objects contain properties. For these reasons, and many others, more people are tending toward the use of JSON. So, that is what we will focus on for the remainder of this application. In saying that, you can go ahead and delete the tblOutputXML table from the HTML file.
And now you know how to make a simple request to a RESTful web service and parse the data in both XML and JSON. Now that the page is fully functional, we will begin to add some style to the page. Last time we used Bootstrap and some simple CSS to perform this task. Next week, we will dig into SASS, and how we can write more complex logic that will compile into CSS. If you have any questions, please use the comment section below. And remember to share this post on your favorite social media platform. Until next week, try and add some additional columns to your table to display more information about each book. Test your knowledge and your skills. See you next week.