QXmlStreamAttributes Class Reference |
void | append ( const QString & namespaceUri, const QString & name, const QString & value ) |
void | append ( const QXmlStreamAttribute & attribute ) |
void | append ( const QString & qualifiedName, const QString & value ) |
bool | hasAttribute ( const QString & qualifiedName ) const |
bool | hasAttribute ( const QLatin1String & qualifiedName ) const |
bool | hasAttribute ( const QString & namespaceUri, const QString & name ) const |
QStringRef | value ( const QString & namespaceUri, const QString & name ) const |
QStringRef | value ( const QString & namespaceUri, const QLatin1String & name ) const |
QStringRef | value ( const QLatin1String & namespaceUri, const QLatin1String & name ) const |
QStringRef | value ( const QString & qualifiedName ) const |
QStringRef | value ( const QLatin1String & qualifiedName ) const |
The QXmlStreamAttributes class represents a vector of QXmlStreamAttribute.
Attributes are returned by a QXmlStreamReader in attributes() when the reader reports a start element. The class can also be used with a QXmlStreamWriter as an argument to writeAttributes().
The convenience function value() loops over the vector and returns an attribute value for a given namespaceUri and an attribute's name.
New attributes can be added with append().
Appends a new attribute with name in the namespace described with namespaceUri, and value value. The namespaceUri can be empty.
Appends the given attribute to the end of the vector.
See also QVector::append().
This is an overloaded function.
Appends a new attribute with qualified name qualifiedName and value value.
Returns true if this QXmlStreamAttributes has an attribute whose qualified name is qualifiedName; otherwise returns false.
Note that this is not namespace aware. For instance, if this QXmlStreamAttributes contains an attribute whose lexical name is "xlink:href" this doesn't tell that an attribute named href in the XLink namespace is present, since the xlink prefix can be bound to any namespace. Use the overload that takes a namespace URI and a local name as parameter, for namespace aware code.
This function was introduced in Qt 4.5.
This is an overloaded function.
This function was introduced in Qt 4.5.
This is an overloaded function.
Returns true if this QXmlStreamAttributes has an attribute whose namespace URI and name correspond to namespaceUri and name; otherwise returns false.
This function was introduced in Qt 4.5.
Returns the value of the attribute name in the namespace described with namespaceUri, or an empty string reference if the attribute is not defined. The namespaceUri can be empty.
This is an overloaded function.
Returns the value of the attribute name in the namespace described with namespaceUri, or an empty string reference if the attribute is not defined. The namespaceUri can be empty.
This is an overloaded function.
Returns the value of the attribute name in the namespace described with namespaceUri, or an empty string reference if the attribute is not defined. The namespaceUri can be empty.
This is an overloaded function.
Returns the value of the attribute with qualified name qualifiedName , or an empty string reference if the attribute is not defined. A qualified name is the raw name of an attribute in the XML data. It consists of the namespace prefix, followed by colon, followed by the attribute's local name. Since the namespace prefix is not unique (the same prefix can point to different namespaces and different prefixes can point to the same namespace), you shouldn't use qualified names, but a resolved namespaceUri and the attribute's local name.
This is an overloaded function.
Returns the value of the attribute with qualified name qualifiedName , or an empty string reference if the attribute is not defined. A qualified name is the raw name of an attribute in the XML data. It consists of the namespace prefix, followed by colon, followed by the attribute's local name. Since the namespace prefix is not unique (the same prefix can point to different namespaces and different prefixes can point to the same namespace), you shouldn't use qualified names, but a resolved namespaceUri and the attribute's local name.
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.6 | |
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