Encoding of errors in xml