This patch adds support for XML output to be returned if an 'output' parameter that equals 'xml' has been sent from the API client.
XML support may also need to be patched to the client libraries.
Add optional XML output directive + code for API call responses
Revert previous XML generation code
Refactoring of the XML response generation code
Add XmlGeneratour code