QDomProcessingInstruction Class
QDomProcessingInstruction 클래스는 XML 처리 명령을 나타냅니다. 더 보기...
Header: | #include <QDomProcessingInstruction> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Xml) target_link_libraries(mytarget PRIVATE Qt6::Xml) |
qmake: | QT += xml |
상속합니다: | QDomNode |
- 상속된 멤버를 포함한 모든 멤버의 목록
- QDomProcessingInstruction은 XML 클래스의 일부입니다.
참고: 이 클래스의 모든 함수는 재진입합니다.
공용 함수
QDomProcessingInstruction() | |
QDomProcessingInstruction(const QDomProcessingInstruction &processingInstruction) | |
QString | data() const |
QDomNode::NodeType | nodeType() const |
void | setData(const QString &data) |
QString | target() const |
QDomProcessingInstruction & | operator=(const QDomProcessingInstruction &other) |
상세 설명
처리 명령은 XML에서 문서 텍스트에 프로세서 관련 정보를 유지하기 위해 사용됩니다.
XML 문서의 맨 위에 나타나는 XML 선언(일반적으로 <?xml version='1.0' encoding='UTF-8'?>
)은 QDom에서 처리 명령으로 취급됩니다. XML 선언은 처리 명령이 아니므로 다른 차이점 중에서도 첫 줄 외에는 문서에 삽입할 수 없다는 점이 아쉽습니다.
이 함수는 처리 명령과 동일한 구문을 가지고 있지만 처리 명령이 아니며 QDom에서 그렇게 취급하지 않을 수 있으므로 이 함수를 사용하여 XML 선언을 만들지 마십시오.
처리 명령의 내용은 data()로 검색하고 setData()로 설정합니다. 처리 명령의 대상은 target()로 검색됩니다.
문서 객체 모델에 대한 자세한 내용은 레벨 1 및 레벨 2 코어를 참조하세요. DOM 구현에 대한 보다 일반적인 소개는 QDomDocument 문서를 참조하세요.
멤버 함수 문서
QDomProcessingInstruction::QDomProcessingInstruction()
빈 처리 인스트럭션을 생성합니다. QDomDocument::createProcessingInstruction ()를 사용하여 콘텐츠가 포함된 처리 명령을 생성합니다.
QDomProcessingInstruction::QDomProcessingInstruction(const QDomProcessingInstruction &processingInstruction)
processingInstruction 의 복사본을 생성합니다.
사본의 데이터는 공유됩니다(얕은 사본): 한 노드를 수정하면 다른 노드도 변경됩니다. 심층 복사본을 만들려면 cloneNode()를 사용합니다.
QString QDomProcessingInstruction::data() const
이 처리 명령의 내용을 반환합니다.
QDomNode::NodeType QDomProcessingInstruction::nodeType() const
반환값 ProcessingInstructionNode
.
void QDomProcessingInstruction::setData(const QString &data)
처리 명령에 포함된 데이터를 data 로 설정합니다.
data()도 참조하세요 .
QString QDomProcessingInstruction::target() const
이 처리 명령의 대상을 반환합니다.
data()도 참조하세요 .
QDomProcessingInstruction &QDomProcessingInstruction::operator=(const QDomProcessingInstruction &other)
이 처리 명령에 other 을 할당합니다.
복사본의 데이터는 공유됩니다(얕은 복사본): 한 노드를 수정하면 다른 노드도 변경됩니다. 심층 복사본을 만들려면 cloneNode()를 사용합니다.
© 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.