QDomNodeList Class
QDomNodeList クラスはQDomNode オブジェクトのリストです。詳細...
ヘッダー | #include <QDomNodeList> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Xml) target_link_libraries(mytarget PRIVATE Qt6::Xml) |
qmake: | QT += xml |
- 継承メンバを含む全メンバのリスト
- QDomNodeList はXML クラスの一部です。
注釈このクラスの関数はすべてリエントラントです。
パブリック関数
QDomNodeList() | |
QDomNodeList(const QDomNodeList &nodeList) | |
~QDomNodeList() | |
QDomNode | at(int index) const |
int | count() const |
bool | isEmpty() const |
QDomNode | item(int index) const |
int | length() const |
int | size() const |
bool | operator!=(const QDomNodeList &other) const |
QDomNodeList & | operator=(const QDomNodeList &other) |
bool | operator==(const QDomNodeList &other) const |
詳細説明
リストはQDomDocument::elementsByTagName() およびQDomNode::childNodes() で取得できます。ドキュメント・オブジェクト・モデル(DOM)は、これらのリストが "ライブ "であることを要求します:基礎となるドキュメントを変更するたびに、リストの内容は更新されます。
リストから特定のノードを取得するには、item() を使用します。リスト内の項目数はlength() で返されます。
ドキュメント・オブジェクト・モデルの詳細については、レベル1およびレベル2コアを参照してください。DOM 実装のより一般的な紹介については、QDomDocument ドキュメントを参照してください。
QDomNode::childNodes() およびQDomDocument::elementsByTagName()も参照して ください。
メンバ関数のドキュメント
QDomNodeList::QDomNodeList()
空のノード・リストを作成します。
QDomNodeList::QDomNodeList(const QDomNodeList &nodeList)
nodeList のコピーを作成する。
[noexcept]
QDomNodeList::~QDomNodeList()
オブジェクトを破壊し、そのリソースを解放する。
QDomNode QDomNodeList::at(int index) const
この関数は、Qt API の一貫性を保つために用意されています。これはitem() と同等です。
index が負の場合、またはindex >=length() の場合は、NULL ノードが返されます(つまり、QDomNode::isNull() が true を返すノード)。
int QDomNodeList::count() const
この関数は、Qt API の一貫性を保つために用意されています。length() と同等です。
bool QDomNodeList::isEmpty() const
リストに項目がない場合はtrue
を返し、そうでない場合はfalse
を返します。この関数は Qt API の一貫性のために提供されています。
QDomNode QDomNodeList::item(int index) const
位置index にあるノードを返す。
index が負の場合、またはindex >=length() の場合、NULL ノードが返される(つまり、QDomNode::isNull() が真を返すノード)。
length()も参照してください 。
int QDomNodeList::length() const
リストに含まれるノードの数を返します。
int QDomNodeList::size() const
この関数は、Qt API の一貫性を保つために用意されています。length() と同等です。
bool QDomNodeList::operator!=(const QDomNodeList &other) const
true
ノードリストother とこのノードリストが等しくない場合はfalse
を返す。
QDomNodeList &QDomNodeList::operator=(const QDomNodeList &other)
このノードリストにother を割り当てる。
bool QDomNodeList::operator==(const QDomNodeList &other) const
ノードリストother とこのノードリストが等しい場合は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.