이 페이지에서

QDomText Class

QDomText 클래스는 구문 분석된 XML 문서 내의 텍스트 데이터를 나타냅니다. 더 보기...

헤더: #include <QDomText>
CMake: find_package(Qt6 REQUIRED COMPONENTS Xml)
target_link_libraries(mytarget PRIVATE Qt6::Xml)
qmake: QT += xml
상속: QDomCharacterData
상속받는 클래스:

QDomCDATASection

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

공개 함수

QDomText()
QDomText(const QDomText &text)
QDomNode::NodeType nodeType() const
QDomText splitText(int offset)
QDomText &operator=(const QDomText &other)

상세 설명

splitText()을 사용하여 QDomText 객체에 포함된 텍스트를 두 개의 QDomText 객체로 분할할 수 있습니다.

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

멤버 함수 문서

QDomText::QDomText()

빈 QDomText 객체를 생성합니다.

내용이 포함된 QDomText를 생성하려면 ` QDomDocument::createTextNode()`를 사용하십시오.

QDomText::QDomText(const QDomText &text)

text 의 복사본을 생성합니다.

복사본의 데이터는 공유됩니다(얕은 복사): 한 노드를 수정하면 다른 노드도 함께 변경됩니다. 깊은 복사를 하려면 cloneNode()를 사용하십시오.

QDomNode::NodeType QDomText::nodeType() const

TextNode 를 반환합니다.

QDomText QDomText::splitText(int offset)

이 DOM 텍스트 객체를 두 개의 QDomText 객체로 분할합니다. 이 객체는 처음 offset 자를 유지하고, 두 번째(새로 생성된) 객체는 나머지 문자를 포함하여 이 객체 뒤에 문서 트리에 삽입됩니다.

이 함수는 새로 생성된 객체를 반환합니다.

QDomNode::normalize()도 참조하십시오 .

QDomText &QDomText::operator=(const QDomText &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.