Turn groupings JSON into XML

This action wasn't being performed. Adds tests and code.

Fixes #4