produce properly formatted error xml