QXmlSchema Class
The QXmlSchema class provides loading and validation of a W3C XML Schema. More...
| Header: | #include <QXmlSchema> |
| qmake: | QT += xmlpatterns |
| Since: | Qt 4.6 |
This class was introduced in Qt 4.6.
Note: All functions in this class are reentrant.
Detailed Description
The QXmlSchema class loads, compiles and validates W3C XML Schema files that can be used further for validation of XML instance documents via QXmlSchemaValidator.
The following example shows how to load a XML Schema file from the network and test whether it is a valid schema document:
QUrl url("http://www.schema-example.org/myschema.xsd");
QXmlSchema schema;
if (schema.load(url) == true)
qDebug() << "schema is valid";
else
qDebug() << "schema is invalid";
XML Schema Version
This class is used to represent schemas that conform to the XML Schema 1.0 specification.
See also QXmlSchemaValidator and XML Schema Validation Example.