Loading XML Data into TIBCO Spotfire
Blog: The Tibco Blog
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.
Install XML Package using TERR tools
Install an XML package available at CRAN. This provides tools for parsing and creating XML in R.
*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.
This script can easily bring XML data into Spotfire for further analysis. The data function can be executed with a click of button or can refresh automatically.
For a live demonstration of this example, click here and navigate to the Dr. Spotfire Office Hours from May 23rd, 2017. Give TIBCO Spotfire a free try to see for yourself.
Leave a Comment
You must be logged in to post a comment.