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(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 を持つ属性を構築します。
QXmlStreamAttribute::QXmlStreamAttribute(const QString &namespaceUri, const QString &name, const QString &value)
namespaceUri で記述された名前空間に、name と値value を持つ属性を構築する。
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() で構成されます。namespaceUri name名前空間接頭辞は一意ではないので(同じ接頭辞が異なる名前空間を指すこともあれば、異なる接頭辞が同じ名前空間を指すこともあります)、qualifiedName()を使用すべきではありません。
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
を返す。
© 2025 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.