Methods For Retrieving The Data From The London Data Store

Submitted By Glroiawu
Words: 327
Pages: 2

Xuefan Wu was in charge of retrieving the data from the London Data Store and processing it for implementing some specific functions. Since the data we used cannot be downloaded for being analyzed directly, I chose to transform the data from Excel file into XML file. XML file is a markup language which defines several rules for encoding documents in a format that is both machine-readable and human-readable. It is the most common format to store statistics. The data in the XML files can only be used after XML file is parsed. There are two main approaches for parsing XML, which are Document Object Model and Simple API for XML. The method seected in this application was DOM, which is a tree model parser. High amount of memory is required for this method since it loads the entire XML file completely into the memory. As for this application, due to the small XML files and the possibility of amending them in the future, the DOM method was adopted. There are several steps for parsing XML file using DOM. An instance of DocumentBuilderFactory and an object of DocumentBuilder are created to obtain the document, which has the basic access to XML data as the root of the tree.
After parsing XML files, the data was stored into NodeList. Therefore, it can be analysed and processed by me for presenting the each year data and rank place of a borough in terms of the chosen criterion.
I also implemented the functions that allow users to read and provide their comments so that they can