QXmlStreamAttribute Class
QXmlStreamAttribute クラスは、単一の XML 属性を表します。詳細...
| ヘッダー: | #include <QXmlStreamAttribute> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
- 継承されたメンバーを含むすべてのメンバーの一覧
- QXmlStreamAttribute はXML クラスの一部です。
注:このクラスのすべての関数は再入可能です。
QXmlStreamAttribute の比較
| カテゴリ | 比較可能な型 |
|---|---|
| 等価性 | QXmlStreamAttribute |
パブリック関数
| 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 |
関連する非メンバー
| bool | operator!=(const QXmlStreamAttribute &lhs, const QXmlStreamAttribute &rhs) |
| bool | operator==(const QXmlStreamAttribute &lhs, const QXmlStreamAttribute &rhs) |
詳細な説明
属性は、オプションで空のnamespaceUri()、name()、value()、およびisDefault() 属性で構成されます。
生の XML 属性名は、qualifiedName() として返されます。
メンバ関数のドキュメント
QXmlStreamAttribute::QXmlStreamAttribute()
空の属性を作成します。
QXmlStreamAttribute::QXmlStreamAttribute(const QString &qualifiedName, const QString &value)
修飾名「qualifiedName 」、値「value 」を持つ属性を構築します。
この属性は、isDefault() ==false となります。
QXmlStreamAttribute::QXmlStreamAttribute(const QString &namespaceUri, const QString &name, const QString &value)
namespaceUri で指定された名前空間に、name および値value を持つ属性を構築します。
この属性のisDefault() ==false となります。
bool QXmlStreamAttribute::isDefault() const
パーサーがDTD内のATTLIST宣言に従ってこの属性をデフォルト値とともに追加した場合はtrue を返し、それ以外の場合はfalse を返します。
QStringView QXmlStreamAttribute::name() const
その属性のローカル名を返します。
QStringView QXmlStreamAttribute::namespaceUri() const
属性の解決済みnamespaceUriを返します。属性に定義された名前空間がない場合は、空の文字列参照を返します。
QStringView QXmlStreamAttribute::prefix() const
属性の名前空間プレフィックスを返します。
name() およびqualifiedName()も参照してください 。
QStringView QXmlStreamAttribute::qualifiedName() const
属性の修飾名を返します。
修飾名は、XML データ内の属性の生名です。これは、名前空間prefix() にコロン、その後に属性のローカル名name() が続く形式で構成されます。 名前空間プレフィックスは一意ではないため(同じプレフィックスが異なる名前空間を指すこともあれば、異なるプレフィックスが同じ名前空間を指すこともある)、qualifiedName() を使用するのではなく、解決済み名namespaceUri() および属性のローカル名name() を使用する必要があります。
QStringView QXmlStreamAttribute::value() const
属性の値を返します。
関連する非メンバー
[noexcept] bool operator!=(const QXmlStreamAttribute &lhs, const QXmlStreamAttribute &rhs)
lhs の属性をrhs と比較し、両者が等しくない場合はtrue を返し、等しい場合はfalse を返します。
[noexcept] bool operator==(const QXmlStreamAttribute &lhs, const QXmlStreamAttribute &rhs)
lhs の属性をrhs と比較し、両者が等しい場合はtrue を返し、そうでない場合は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.