[Interest] XML schema validation alternatives?

Murphy, Sean smurphy at walbro.com
Mon May 11 21:49:20 CEST 2015


I was trying to use QXmlSchemaValidator to validate XML files vs. their associated schema and I'm encountering an infinite loop that eventually causes the application to crash. It's been reported (over 5 years ago) in https://bugreports.qt.io/browse/QTBUG-12534 It fails on pretty simple examples, when the schema contains an "xs:all", another bug reporting it that has a very simple schema/xml example is https://bugreports.qt.io/browse/QTBUG-35052 .

Does anyone have a recommended alternative? Either a workaround to still use this class, or a third party library (preferable LGPL or similar licensing) that I could use for XML validation? One pretty hacky workaround is that changing the xs:all to an xs:sequence in the schema document fixes the issue, except that imposes an unwanted restriction in the corresponding XML files that the elements need to come in a specific order, which isn't really what we want.

Sean



More information about the Interest mailing list