Fix to application/xml output so that valid XML is returned.