RE: [xml] Error handling with the XmlReader API

Is such a distinction useful?

   Yes because a validation error is not a fatal error parser error
and both kind of errors tends to be processed in very different ways.


However it seems to me that the python bindings provide 
adequate support
since the type of error/warning is provided (parser vs. validity).

This is true for xmlTextReader where there is one callback
with 4 possible error levels, 
but not for parserCtxt where I made 2 callbacks
(one for errors AND validity errors, and one for warnings
AND validity warnings).
Should I add the 2 necessary callbacks for the xmlParserCtxt 
python bindings?

  No the error level should be sufficient to distinguish the case.
an unified callback is not a problem, the key is to be able 
to distinguish
the level of the error.

Agreed for xmlTextReader. For parserCtxt, I propose to
add 2 more callbacks, unless you prefer one callback with
an error level in that case also.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]