이 페이지에서

QDomNodeList Class

QDomNodeList 클래스는 QDomNode 객체들의 목록입니다. 더 보기...

헤더: #include <QDomNodeList>
CMake: find_package(Qt6 REQUIRED COMPONENTS Xml)
target_link_libraries(mytarget PRIVATE Qt6::Xml)
qmake: QT += xml

참고: 이 클래스의 모든 함수는 재진입 가능합니다.

공개 유형

(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

공개 함수

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)
bool operator!=(const QDomNodeList &lhs, const QDomNodeList &rhs)
bool operator==(const QDomNodeList &lhs, const QDomNodeList &rhs)

자세한 설명

목록은 ` QDomDocument::elementsByTagName()` 및 ` QDomNode::childNodes()`를 통해 얻을 수 있습니다. DOM(Document Object Model)에서는 이러한 목록이 "실시간"이어야 합니다. 즉, 기본 문서가 변경될 때마다 목록의 내용이 업데이트됩니다.

item()을 사용하여 목록에서 특정 노드를 가져올 수 있습니다. 목록에 포함된 항목의 수는 length()을 통해 반환됩니다.

문서 객체 모델(DOM)에 대한 자세한 내용은 레벨 1 및 레벨 2 코어를 참조하십시오. DOM 구현에 대한 보다 일반적인 소개는 QDomDocument 문서를 참조하십시오.

QDomNode::childNodes() 및 QDomDocument::elementsByTagName()도 참조하십시오 .

멤버 유형 문서

[alias, since 6.9] QDomNodeList::const_iterator

[alias, since 6.9] QDomNodeList::const_reverse_iterator

QDomNodeList 을 기반으로 양방향 이터레이터를 구현하는 불투명 클래스에 대한 타입 정의입니다.

참고: QDomNodeList 는 노드를 제자리에서 수정하는 기능을 지원하지 않으므로, 변경 가능한 이터레이터는 없습니다.

이 타입 정의는 Qt 6.9에서 도입되었습니다.

[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

STL 호환성을 위해 제공됩니다.

참고: ` QDomNodeList `는 노드를 제자리에서 수정하는 것을 지원하지 않으므로, `reference`와 ` const_reference `는 동일한 유형이며, `pointer`와 ` const_pointer`도 마찬가지입니다.

이러한 typedef는 Qt 6.9에서 도입되었습니다.

멤버 함수 설명서

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를 반환하는 노드).

[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

각각 목록의 첫 번째 항목이나 마지막 항목 바로 다음 항목을 가리키는 ` const_iterator ` 또는 ` const_reverse_iterator`를 반환합니다.

참고: QDomNodeList 는 노드를 제자리에서 수정하는 기능을 지원하지 않으므로, 변경 가능한 이터레이터는 없습니다.

이 함수들은 Qt 6.9에서 도입되었습니다.

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()이 true를 반환하는 노드).

length()도 참조하십시오 .

int QDomNodeList::length() const

목록에 포함된 노드의 개수를 반환합니다.

int QDomNodeList::size() const

이 함수는 Qt API의 일관성을 위해 제공됩니다. 이는 ` length()`와 동일합니다.

QDomNodeList &QDomNodeList::operator=(const QDomNodeList &other)

이 노드 목록에 other 을 할당합니다.

관련 비회원

[noexcept] bool operator!=(const QDomNodeList &lhs, const QDomNodeList &rhs)

노드의 ` lhs `과 ` rhs ` 목록이 서로 다를 경우 ` true `을 반환하고, 그렇지 않은 경우 ` false`을 반환합니다.

[noexcept] bool operator==(const QDomNodeList &lhs, const QDomNodeList &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.