XML stands for eXtensible Markup Language and it was designed to store and transport data. It is information or data wrapped in tags, and the author of the XML document defines these tags. The popularity of XML data can be attributed to its ability to store hardware- and software-independent data in plain text format for easy sharing and transportation. It also facilitates the ability to expand or upgrade to new operating systems, applications, or browsers—all with no data loss.
In this example, we will walk through steps to load an unstructured data format like XML into TIBCO Spotfire for analysis. Our XML data source can be a local file or accessible via HTTP or FTP.
*Note that there are other packages available to parse XML, but we are using XML for this example.
Create a Data function to Load XML
Once the required package is loaded, xmlTreeParse or xmlParse can be used to generate the R structure. Click here for details about XML Package.
xmlToDataFrame can be used to generate DataFrame from the XML source. This output DataFrame can be defined as output parameter which returns type table. This table is where users can view XML contents as a table.