Retrieve datasets

March 13, 2016

Report Abuse
This experiment dynamically retrieves XML data from for any data set with API access and converts XML to dataset
This experiment uses XML library to retrieve any government public dataset available as API in XML format using APIs for example ppi data shown [here][1]. This experiment first finds the number of records in the XML using XMLSize command along with location for first record. Once it knows the total records, it parses each record and converts each record to individual row of data returned by the API. It uses XMLParse to parse the HTML content. It uses XMLRoot to find the root of XML and then it traverses each node to retrieve specific elements such as Year, Period and value. It uses XMLName, XMLValue and XMLAttr to convert the final XML leaf node to desired record. [1]: