QDomDocumentFragment Class
QDomDocumentFragment 클래스는 QDomNode로 구성된 트리이며, 일반적으로 완전한 QDomDocument 는 아닙니다. 더 보기...
| 헤더: | #include <QDomDocumentFragment> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Xml) target_link_libraries(mytarget PRIVATE Qt6::Xml) |
| qmake: | QT += xml |
| 상속: | QDomNode |
- 상속된 멤버를 포함한 모든 멤버 목록
- QDomDocumentFragment는 XML 클래스의 일부입니다.
참고: 이 클래스의 모든 함수는 재진입 가능합니다.
공개 함수
| QDomDocumentFragment() | |
| QDomDocumentFragment(const QDomDocumentFragment &documentFragment) | |
| QDomNode::NodeType | nodeType() const |
| QDomDocumentFragment & | operator=(const QDomDocumentFragment &other) |
상세 설명
복잡한 트리 작업을 수행하려는 경우, 노드와 그 관계를 저장할 수 있는 경량 클래스가 유용합니다. QDomDocumentFragment는 반드시 잘 구성된 XML 문서를 나타내지는 않는 문서의 하위 트리를 저장합니다.
QDomDocumentFragment는 여러 노드를 목록으로 묶어 특정 노드의 자식으로 한꺼번에 삽입하려는 경우에도 유용합니다. 이러한 경우 QDomDocumentFragment는 자식 목록을 담는 임시 컨테이너로 사용할 수 있습니다.
QDomDocumentFragment의 가장 중요한 특징은 QDomNode::insertAfter(), QDomNode::insertBefore(), QDomNode::replaceChild() 및 QDomNode::appendChild()에 의해 특별한 방식으로 처리된다는 점입니다. 즉, 프래그먼트 자체를 삽입하는 대신 프래그먼트의 모든 자식 노드가 삽입됩니다.
멤버 함수 문서
QDomDocumentFragment::QDomDocumentFragment()
빈 문서 조각을 생성합니다.
QDomDocumentFragment::QDomDocumentFragment(const QDomDocumentFragment &documentFragment)
documentFragment 의 복사본을 생성합니다.
복사본의 데이터는 공유됩니다(얕은 복사): 한 노드를 수정하면 다른 노드도 함께 변경됩니다. 깊은 복사를 하려면 cloneNode()를 사용하십시오.
QDomNode::NodeType QDomDocumentFragment::nodeType() const
DocumentFragment 를 반환합니다.
isDocumentFragment() 및 QDomNode::toDocumentFragment()도 참조하십시오 .
QDomDocumentFragment &QDomDocumentFragment::operator=(const QDomDocumentFragment &other)
이 DOM 문서 조각에 ` other `를 할당합니다.
복사된 데이터는 공유됩니다(얕은 복사): 한 노드를 수정하면 다른 노드도 함께 변경됩니다. 깊은 복사를 하려면 cloneNode()를 사용하십시오.
© 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.