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()가 참을 반환하는 노드).
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()이면 널 노드가 반환됩니다(즉, QDomNode::isNull()이 참을 반환하는 노드).
length()도 참조하세요 .
int QDomNodeList::length() const
목록에 있는 노드 수를 반환합니다.
int QDomNodeList::size() const
이 함수는 Qt API 일관성을 위해 제공됩니다. length ()와 동일합니다.
bool QDomNodeList::operator!=(const QDomNodeList &other) const
노드 목록 other 과 이 노드 목록이 같지 않으면 true
을 반환하고, 그렇지 않으면 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.