QXmlSchema Class ReferenceThe QXmlSchema class provides loading and validation of a W3C XML Schema. More... #include <QXmlSchema> Note: All functions in this class are reentrant. This class was introduced in Qt 4.6. Public Functions
Detailed DescriptionThe QXmlSchema class provides loading and validation of a W3C XML Schema. 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 VersionThis class is used to represent schemas that conform to the XML Schema 1.0 specification. See also QXmlSchemaValidator and XML Schema Validation Example. Member Function Documentation
|
message() argument | Semantics |
---|---|
QtMsgType type | Only QtWarningMsg and QtFatalMsg are used. The former identifies a warning, while the latter identifies an error. |
const QString & description | An XHTML document which is the actual message. It is translated into the current language. |
const QUrl &identifier | Identifies the error with a URI, where the fragment is the error code, and the rest of the URI is the error namespace. |
const QSourceLocation & sourceLocation | Identifies where the error occurred. |
See also messageHandler().
Sets the network manager to manager. QXmlSchema does not take ownership of manager.
See also networkAccessManager().
Sets the URI resolver to resolver. QXmlSchema does not take ownership of resolver.
See also uriResolver().
Returns the schema's URI resolver. If no URI resolver has been set, QtXmlPatterns will use the URIs in schemas as they are.
The URI resolver provides a level of abstraction, or polymorphic URIs. A resolver can rewrite logical URIs to physical ones, or it can translate obsolete or invalid URIs to valid ones.
When QtXmlPatterns calls QAbstractUriResolver::resolve() the absolute URI is the URI mandated by the schema specification, and the relative URI is the URI specified by the user.
See also setUriResolver().
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.8 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com