Modified code to work with XML as attachments instead of inlined with the document metadata
Modified code to work with XML as attachments instead of inlined with document metadata
Changed content type application/xml to text/xml because Cloudant does not compress the former