diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/xmlpatterns/api/qxmlschema.cpp | 5 | ||||
-rw-r--r-- | src/xmlpatterns/api/qxmlschemavalidator.cpp | 12 |
2 files changed, 14 insertions, 3 deletions
diff --git a/src/xmlpatterns/api/qxmlschema.cpp b/src/xmlpatterns/api/qxmlschema.cpp index ec370ca..c6dc9b2 100644 --- a/src/xmlpatterns/api/qxmlschema.cpp +++ b/src/xmlpatterns/api/qxmlschema.cpp @@ -58,6 +58,11 @@ that can be used further for validation of XML instance documents via \l{QXmlSchemaValidator}. + The following example shows how to load a XML Schema file from the network + and test whether it is a valid schema document: + + \snippet doc/src/snippets/qxmlschema/main.cpp 0 + \sa QXmlSchemaValidator, {xmlpatterns/schema}{XML Schema Validation Example} */ diff --git a/src/xmlpatterns/api/qxmlschemavalidator.cpp b/src/xmlpatterns/api/qxmlschemavalidator.cpp index dc8e55d..d5596c5 100644 --- a/src/xmlpatterns/api/qxmlschemavalidator.cpp +++ b/src/xmlpatterns/api/qxmlschemavalidator.cpp @@ -63,6 +63,12 @@ The QXmlSchemaValidator class loads, parses an XML instance document and validates it against a W3C XML Schema that has been compiled with \l{QXmlSchema}. + The following example shows how to load a XML Schema from a local + file, check whether it is a valid schema document and use it for validation + of an XML instance document: + + \snippet doc/src/snippets/qxmlschemavalidator/main.cpp 3 + \sa QXmlSchema, {xmlpatterns/schema}{XML Schema Validation Example} */ @@ -110,7 +116,7 @@ void QXmlSchemaValidator::setSchema(const QXmlSchema &schema) Validates the XML instance document read from \a data with the given \a documentUri against the schema. - Returns \c true if the XML instance document is valid according the + Returns \c true if the XML instance document is valid according to the schema, \c false otherwise. Example: @@ -130,7 +136,7 @@ bool QXmlSchemaValidator::validate(const QByteArray &data, const QUrl &documentU /*! Validates the XML instance document read from \a source against the schema. - Returns \c true if the XML instance document is valid according the + Returns \c true if the XML instance document is valid according to the schema, \c false otherwise. Example: @@ -155,7 +161,7 @@ bool QXmlSchemaValidator::validate(const QUrl &source) const Validates the XML instance document read from \a source with the given \a documentUri against the schema. - Returns \c true if the XML instance document is valid according the + Returns \c true if the XML instance document is valid according to the schema, \c false otherwise. Example: |