November 25, 2010

ixSci ixSci
Lab Rat
203 posts

QXmlDefaultHandler fatalError\error\warning are not triggered during invalid XML doc parsing

 

Hello!

I’ve encountered the situation which is described in the topic theme above. I have: invalid XML document(incomplete tags, e.g <tag> without close </tag>), custom class which inherits QXmlDefaultHandler and overrides fatalError\error\warning virtual methods. I fed my invalid XML to the parser and it returned false but none of fatalError\error\warning methods were triggered.
Does anybody know something about such behavior? Is it a bug or an undocumented feature? :)

2 replies

November 25, 2010

Volker Volker
Robot Herder
5428 posts

Did you set

@
xmlReader.setErrorHandler(handler);
@?

See QXmlDefaultHandler/Detail Descripton [doc.qt.nokia.com] for code snippets.

November 25, 2010

ixSci ixSci
Lab Rat
203 posts

Doh! I’ve totally misinterpreted Qt docs. Volker, thank your for opening my eyes

 
  ‹‹ [Solved] How to make the center widget maxmize together with the application?      Invalid parameter passed to C runtime function. ››

You must log in to post a reply. Not a member yet? Register here!