Important: Please read the Qt Code of Conduct -

Qt 5.4 : XML and XSD in data model

  • Hi,

    I have an xsd file with more than 700 fields. There are to many fields to use QXmlStreamReader, and test each branch or node.

    In C#, we can create a .cs file from an .xsd file, and use the class to fill data into and serialize / deserialize it into / from an XML file.

    How can I do this in Qt ? What is the best way to fill or read data received into an XML file, validate it using on .xsd file, and use the data as a class (or data model) in my software ?

    Thanks for answers or advices.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    AFAIK, there's no direct Qt way to do this however your can use "this": to generate C++ classes that you can then use in your Qt code

Log in to reply