[Qt-interest] QXmlSchemaValidator::validate throws exception on validation error

Konrad Rosenbaum konrad at silmor.de
Tue May 11 16:32:25 CEST 2010


On Tue, May 11, 2010 16:04, Ulf-Alexander v. Ceumern-Lindenstjerna wrote:
> I just recently decided to use QXmlSchemaValidator to validate my xml
> files.
>
> This seems to work just fine, except that QXmlSchemaValidator::validate
> throws an exception deep in QPatternist::ReportContext::createError:

You should never get the exception in your own code. It is caught inside
QXmlSchemaValidator.

You use a class derived from QAbstractMessageHandler to get the error
message.

Have a look at the schema example - it shows pretty well how to use these
classes.


    Konrad




More information about the Qt-interest-old mailing list