XML Validation against XSD

  • Hi,
    Is there some other Qt way then QXmlSchemaValidator from xmlpatterns how to check XML conforming XSD? Or I have to use external library? (currently xmllint) I'm on Qt4

    I cannot use QXmlSchemaValidator as its allocating all RAM(12GB)+swap and then failing on out of memory. It's generating permutation 11 deep inside Qt code :-/ (Shared between Qt4 and Qt5)


  • Moderators

    12GB of RAM?!
    How big are your XML files?
    Could be a bug in QXmlSchemaValidator.

  • @jsulm Yes it's some kind if bug in xmlpatterns, my XSD is 15kB and XML ~200kB. 11 is number of attributes in one element and 11! is a lot. That's why I'm looking for some other way, like QXml.

  • Hi,

    have you tried some XML Schema Validator online (for instance this ) to verify if your XSD is correct?

  • Yep It's valid using the online validator, it's valid in Notepad++, It's valid with xmllint.

  • looks like a bug. I suggest to open a BugReport

  • Yes it's a bug and on Qt4 it will stay so. QTBUG-12534, QTBUG-26824, QTBUG-6485 I' was trying to solve it but it's above my mental abilities :-/ But my question was, is there some other Qt way how to check XML against XSD?

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.