XML API additions

These additions add the ability to output the API in XML format.