Tuesday, August 23, 2011

Processing the Groupon API – Part 3

Concluding the series in this post, we will apply a stylesheet to transform the XML data created from our mapping of the Groupon API into HTML. Here is an example of the XML output from the data mapping we created last time:

XML produced by MapForce from the Groupon API

Assign a Stylesheet to Transform XML

The Component Settings dialog for the output component of the MapForce mapping allows us to assign a stylesheet created with Altova StyleVision.

Tuesday, August 16, 2011

Processing the Groupon API with MapForce – Part 2

In Part 1 of this series we described how to connect Altova MapForce to the Groupon API. We queried the API for a list of Groupon divisions, then used the list to create API queries for all the current deals from every division.

In this part, we will execute the /deals queries and filter the response for the most interesting data.

The list of /deals queries we built previously looks like this:

List of Groupon /deals queries generated by Altova MapForce

To process all the queries, we can connect the list as a dynamic file input to a new mapping component.

When we needed a new component last time, we dropped an API /divisions query into the mapping, and let MapForce create an XML Schema automatically. We could do the same thing here by dropping in an API /deals query as an XML input file. There’s just one small issue -- although the Groupon API online documentation clearly describes the queries we can make, it is vague about the information that will be returned. Before we send dozens of queries to the API for all the current deals, we probably want to know a little more about the data that will come back.

Tuesday, August 9, 2011

The PXF File as the Software Equivalent of Plug and Play – A Database Editing Use Case

A few weeks ago we introduced you to the Portable XML Form (PXF), a file format in which all design elements supporting a StyleVision design including XML Schema and instance documents, SPS design files, XSLT, images, and other external files are embedded.

End users simply open the PXF file in Authentic and can immediately start editing XML and database data.

clip_image014

In this post we’ll create an electronic form for business users to record donations and enter new donors for a fictitious charity called the Green Planet Fund.

Tuesday, August 2, 2011

Processing the Groupon API with Altova MapForce

We often think of a data integration project as a translation from one singular data input file to some other data set, but Altova MapForce lets you greatly expand the concept of an input file.

For instance, the MergeMultipleFiles.mfd example installed with MapForce illustrates how you can use a filename with wildcard characters to merge multiple input files into a single output.

MapForce MergeMultipleFiles.mfd example

A MapForce mapping input doesn’t even need to be a physical file – it can be a URL that returns predictable structured data, like the APIs for popular Web sites like Groupon and many others.