Reading XML files into RATS
Reading XML files into RATS
Hello,
for my work, I obtain data from a website, which could be downloaded in the xml file format (despite they use the extension xls). As it had been pointed out also in this forum, the Excel xlsx format is a zipped xml file, it would be advantageous if RATS would be able to read also data directly from a xml file. In that case, I could read the data directly from the website, without having to download the file, converting it to the proper xlsx format, which then could be read by RATS. The there any that this could achieved directly by RATS? I know that reports could be saved in the xml format. Also many official statistics offices provide data for download in xml format. It would be a real plus, if xml were a file format that RATS could read.
Another file format, which is more often used at internet websites for downloading data is json. Especially some APIs return data in json. Would be also a plus if RATS could read those files and manual converting the data from json into another readable format would be no longer necessary.
Best regards
Peter
for my work, I obtain data from a website, which could be downloaded in the xml file format (despite they use the extension xls). As it had been pointed out also in this forum, the Excel xlsx format is a zipped xml file, it would be advantageous if RATS would be able to read also data directly from a xml file. In that case, I could read the data directly from the website, without having to download the file, converting it to the proper xlsx format, which then could be read by RATS. The there any that this could achieved directly by RATS? I know that reports could be saved in the xml format. Also many official statistics offices provide data for download in xml format. It would be a real plus, if xml were a file format that RATS could read.
Another file format, which is more often used at internet websites for downloading data is json. Especially some APIs return data in json. Would be also a plus if RATS could read those files and manual converting the data from json into another readable format would be no longer necessary.
Best regards
Peter
Re: Reading XML files into RATS
The problem is that XML and JSON are not "formats" but (in effect) languages describing data and other information. Word docs, for instance, are now also in XML. Fishing data out of one of those formats will generally require someone providing a spec which explains how the data are organized. The OECD MEI is provided in JSON and requires a rather lengthy document describing how to find information. (For instance, the covered dates for a series are stored separately from the data.) RATS does include XML as a copy/paste format, but that's specifically the XML for an XLS spreadsheet.
Re: Reading XML files into RATS
It would already be a great help if RATS were able to read xml files for xls spread sheets, which is often the case for tables and statistics provided from websites. Before using a data file for the first time with RATS, I inspect it before always. And if Excel could not read it as a table, then it is not suitable anyhow. For daily data it would safe a lot of time.