Serialize errors as XML