QDomNodeList Class
Die Klasse QDomNodeList ist eine Liste von QDomNode Objekten. Mehr...
Kopfzeile: | #include <QDomNodeList> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Xml) target_link_libraries(mytarget PRIVATE Qt6::Xml) |
qmake: | QT += xml |
- Liste aller Mitglieder, einschließlich geerbter Mitglieder
- QDomNodeList ist Teil von XML Classes.
Hinweis: Alle Funktionen in dieser Klasse sind reentrant.
Öffentliche Typen
(since 6.9) | const_iterator |
(since 6.9) | const_pointer |
(since 6.9) | const_reference |
(since 6.9) | const_reverse_iterator |
(since 6.9) | difference_type |
(since 6.9) | pointer |
(since 6.9) | reference |
(since 6.9) | value_type |
Öffentliche Funktionen
QDomNodeList() | |
QDomNodeList(const QDomNodeList &nodeList) | |
~QDomNodeList() | |
QDomNode | at(int index) const |
(since 6.9) QDomNodeList::const_iterator | begin() const |
(since 6.9) QDomNodeList::const_iterator | cbegin() const |
(since 6.9) QDomNodeList::const_iterator | cend() const |
(since 6.9) QDomNodeList::const_iterator | constBegin() const |
(since 6.9) QDomNodeList::const_iterator | constEnd() const |
int | count() const |
(since 6.9) QDomNodeList::const_reverse_iterator | crbegin() const |
(since 6.9) QDomNodeList::const_reverse_iterator | crend() const |
(since 6.9) QDomNodeList::const_iterator | end() const |
bool | isEmpty() const |
QDomNode | item(int index) const |
int | length() const |
(since 6.9) QDomNodeList::const_reverse_iterator | rbegin() const |
(since 6.9) QDomNodeList::const_reverse_iterator | rend() const |
int | size() const |
QDomNodeList & | operator=(const QDomNodeList &other) |
Verwandte Nicht-Mitglieder
bool | operator!=(const QDomNodeList &lhs, const QDomNodeList &rhs) |
bool | operator==(const QDomNodeList &lhs, const QDomNodeList &rhs) |
Detaillierte Beschreibung
Listen können durch QDomDocument::elementsByTagName() und QDomNode::childNodes() erhalten werden. Das Document Object Model (DOM) erfordert, dass diese Listen "live" sind: Wann immer Sie das zugrunde liegende Dokument ändern, wird der Inhalt der Liste aktualisiert.
Sie können einen bestimmten Knoten aus der Liste mit item() abrufen. Die Anzahl der Elemente in der Liste wird mit length() zurückgegeben.
Weitere Informationen über das Document Object Model finden Sie unter Level 1 und Level 2 Core. Eine allgemeinere Einführung in die DOM-Implementierung finden Sie in der Dokumentation QDomDocument.
Siehe auch QDomNode::childNodes() und QDomDocument::elementsByTagName().
Dokumentation der Mitgliedstypen
[alias, since 6.9]
QDomNodeList::const_iterator
[alias, since 6.9]
QDomNodeList::const_reverse_iterator
Typedefs für eine opake Klasse, die einen bidirektionalen Iterator über eine QDomNodeList implementiert.
Hinweis: QDomNodeList unterstützt nicht das Ändern von Knoten an Ort und Stelle, daher gibt es keinen veränderbaren Iterator.
Dieses Typedef wurde in Qt 6.9 eingeführt.
[alias, since 6.9]
QDomNodeList::const_pointer
[alias, since 6.9]
QDomNodeList::const_reference
[alias, since 6.9]
QDomNodeList::difference_type
[alias, since 6.9]
QDomNodeList::pointer
[alias, since 6.9]
QDomNodeList::reference
[alias, since 6.9]
QDomNodeList::value_type
Wird für STL-Kompatibilität bereitgestellt.
Hinweis: QDomNodeList unterstützt nicht das Ändern von Knoten an Ort und Stelle, daher sind Referenz und const_reference der gleiche Typ, ebenso wie Zeiger und const_pointer.
Dieses Typedef wurde in Qt 6.9 eingeführt.
Dokumentation der Mitgliedsfunktionen
[noexcept, since 6.9]
QDomNodeList::const_iterator QDomNodeList::begin() const
[noexcept, since 6.9]
QDomNodeList::const_iterator QDomNodeList::cbegin() const
[noexcept, since 6.9]
QDomNodeList::const_iterator QDomNodeList::cend() const
[noexcept, since 6.9]
QDomNodeList::const_iterator QDomNodeList::constBegin() const
[noexcept, since 6.9]
QDomNodeList::const_iterator QDomNodeList::constEnd() const
[noexcept, since 6.9]
QDomNodeList::const_iterator QDomNodeList::end() const
[noexcept, since 6.9]
QDomNodeList::const_reverse_iterator QDomNodeList::crbegin() const
[noexcept, since 6.9]
QDomNodeList::const_reverse_iterator QDomNodeList::crend() const
[noexcept, since 6.9]
QDomNodeList::const_reverse_iterator QDomNodeList::rbegin() const
[noexcept, since 6.9]
QDomNodeList::const_reverse_iterator QDomNodeList::rend() const
Gibt ein const_iterator bzw. const_reverse_iterator zurück, das auf das erste bzw. das letzte Element in der Liste zeigt.
Hinweis: QDomNodeList unterstützt nicht das Ändern von Knoten an Ort und Stelle, daher gibt es keinen veränderbaren Iterator.
Diese Funktion wurde in Qt 6.9 eingeführt.
QDomNodeList::QDomNodeList()
Erzeugt eine leere Knotenliste.
QDomNodeList::QDomNodeList(const QDomNodeList &nodeList)
Konstruiert eine Kopie von nodeList.
[noexcept]
QDomNodeList::~QDomNodeList()
Zerstört das Objekt und gibt seine Ressourcen frei.
QDomNode QDomNodeList::at(int index) const
Diese Funktion wird aus Gründen der Qt-API-Konsistenz bereitgestellt. Sie ist äquivalent zu item().
Wenn index negativ ist oder wenn index >= length() ist, wird ein Null-Knoten zurückgegeben (d.h. ein Knoten, für den QDomNode::isNull() true zurückgibt).
int QDomNodeList::count() const
Diese Funktion wird aus Gründen der Qt-API-Konsistenz bereitgestellt. Sie ist äquivalent zu length().
bool QDomNodeList::isEmpty() const
Gibt true
zurück, wenn die Liste keine Elemente enthält; andernfalls wird false
zurückgegeben. Diese Funktion wird aus Gründen der Qt-API-Konsistenz bereitgestellt.
QDomNode QDomNodeList::item(int index) const
Gibt den Knoten an der Position index zurück.
Wenn index negativ ist oder wenn index >= length(), wird ein Null-Knoten zurückgegeben (d. h. ein Knoten, für den QDomNode::isNull() den Wert true liefert).
Siehe auch length().
int QDomNodeList::length() const
Gibt die Anzahl der Knoten in der Liste zurück.
int QDomNodeList::size() const
Diese Funktion wird aus Gründen der Qt-API-Konsistenz bereitgestellt. Sie ist äquivalent zu length().
QDomNodeList &QDomNodeList::operator=(const QDomNodeList &other)
Weist other dieser Knotenliste zu.
Verwandte Nicht-Mitglieder
[noexcept]
bool operator!=(const QDomNodeList &lhs, const QDomNodeList &rhs)
Gibt true
zurück, wenn die Knotenlisten lhs und rhs nicht gleich sind; andernfalls wird false
zurückgegeben.
[noexcept]
bool operator==(const QDomNodeList &lhs, const QDomNodeList &rhs)
Gibt true
zurück, wenn die Knotenlisten lhs und rhs gleich sind; andernfalls wird false
zurückgegeben.
© 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.