It would be enough for my application to know whether validation succeeded or not; line and column numbers would also be good to have, but not vitally important.
Does it also validate against a schema file if the XML includes a reference to it?
afaics no, that's what Qt XML Patterns was for.
Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
Visit the Qt Academy at https://academy.qt.io/catalog
@Christian-Ehrlicher Thank you.
I suppose I misunderstood the documentation here?
https://doc.qt.io/qt-5/qtxml-module.html#details
But I am glad to know that it is still officially supported. I will take a look at Qt XML Patterns now.
@Christian-Ehrlicher Now that Qt 6.0 has been released, I see that the XML patterns module was removed entirely from this version of Qt. What do I need to do, building with Qt 6, in order to validate an XML document against a schema XSD document stored in Qt resources, for example? I haven't found any relative documentation which explains how to compensate for the removal of XML patterns.
Resetting this thread to "unsolved".
Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
Visit the Qt Academy at https://academy.qt.io/catalog
@Christian-Ehrlicher Thank you.
I assume you meant to write: "Don't use Qt6, or else use
an external xsd validation library"?
I know that I could do this with Xerces, but would like to avoid the dependency if I can. Does anyone have suggestions for a lightweight external library? It should work on Linux and Windows, if possible.
@JonB The removed features are listed here. There are still classes which are named beginning with QXml...
, but I don't know if they still work as they did before:
https://wiki.qt.io/New_Features_in_Qt_6.0#Removed_Modules