QXmlStreamAttribute Class
La classe QXmlStreamAttribute rappresenta un singolo attributo XML. Per saperne di più...
| Intestazione: | #include <QXmlStreamAttribute> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
- Elenco di tutti i membri, compresi quelli ereditati
- QXmlStreamAttribute fa parte delle classi XML.
Nota: tutte le funzioni di questa classe sono rientranti.
Confronto tra QXmlStreamAttribute
| Categoria | Tipi comparabili |
|---|---|
| uguaglianza | QXmlStreamAttribute |
Funzioni pubbliche
| QXmlStreamAttribute() | |
| QXmlStreamAttribute(const QString &qualifiedName, const QString &value) | |
| QXmlStreamAttribute(const QString &namespaceUri, const QString &name, const QString &value) | |
| bool | isDefault() const |
| QStringView | name() const |
| QStringView | namespaceUri() const |
| QStringView | prefix() const |
| QStringView | qualifiedName() const |
| QStringView | value() const |
Elementi non membri correlati
| bool | operator!=(const QXmlStreamAttribute &lhs, const QXmlStreamAttribute &rhs) |
| bool | operator==(const QXmlStreamAttribute &lhs, const QXmlStreamAttribute &rhs) |
Descrizione dettagliata
Un attributo è costituito da un attributo ` namespaceUri` (facoltativamente vuoto), un attributo ` name`, un attributo ` value` e un attributo ` isDefault`.
Il nome dell'attributo XML grezzo viene restituito come qualifiedName().
Documentazione delle funzioni membro
QXmlStreamAttribute::QXmlStreamAttribute()
Crea un attributo vuoto.
QXmlStreamAttribute::QXmlStreamAttribute(const QString &qualifiedName, const QString &value)
Crea un attributo con nome qualificato qualifiedName e valore value.
L'attributo avrà isDefault() == false.
QXmlStreamAttribute::QXmlStreamAttribute(const QString &namespaceUri, const QString &name, const QString &value)
Crea un attributo nello spazio dei nomi descritto all'indirizzo namespaceUri con name e valore value.
L'attributo avrà isDefault() == false.
bool QXmlStreamAttribute::isDefault() const
Restituisce ` true ` se il parser ha aggiunto questo attributo con un valore predefinito in seguito a una dichiarazione ATTLIST nel DTD; altrimenti restituisce ` false`.
QStringView QXmlStreamAttribute::name() const
Restituisce il nome locale dell'attributo.
QStringView QXmlStreamAttribute::namespaceUri() const
Restituisce l'URI dello spazio dei nomi risolto dell'attributo oppure un riferimento a una stringa vuota se l'attributo non ha uno spazio dei nomi definito.
QStringView QXmlStreamAttribute::prefix() const
Restituisce il prefisso dello spazio dei nomi dell'attributo.
Vedi anche name() e qualifiedName().
QStringView QXmlStreamAttribute::qualifiedName() const
Restituisce il nome qualificato dell'attributo.
Un nome qualificato è il nome grezzo di un attributo nei dati XML. È costituito dall'prefix e dello spazio dei nomi (), seguito da due punti e dall'name e locale dell'attributo (). Poiché il prefisso dello spazio dei nomi non è univoco (lo stesso prefisso può indicare spazi dei nomi diversi e prefissi diversi possono indicare lo stesso spazio dei nomi), è consigliabile non utilizzare qualifiedName(), ma piuttosto il nome risolto namespaceUri() e il nome locale dell'attributo name().
QStringView QXmlStreamAttribute::value() const
Restituisce il valore dell'attributo.
Elementi non membri correlati
[noexcept] bool operator!=(const QXmlStreamAttribute &lhs, const QXmlStreamAttribute &rhs)
Confronta l'attributo lhs con rhs e restituisce true se non sono uguali; in caso contrario, restituisce false.
[noexcept] bool operator==(const QXmlStreamAttribute &lhs, const QXmlStreamAttribute &rhs)
Confronta l'attributo lhs con rhs e restituisce true se sono uguali; altrimenti restituisce false.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.