QXmlDTDHandler Class
QXmlDTDHandler 클래스는 XML 데이터의 DTD 내용을 보고하기 위한 인터페이스를 제공합니다. 더 보기...
| 헤더: | #include <QXmlDTDHandler> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core5Compat) target_link_libraries(mytarget PRIVATE Qt6::Core5Compat) |
| qmake: | QT += core5compat |
| 상속된 항목: |
참고: 이 클래스의 모든 함수는 재진입 가능합니다.
공개 함수
| virtual | ~QXmlDTDHandler() |
| virtual QString | errorString() const = 0 |
| virtual bool | notationDecl(const QString &name, const QString &publicId, const QString &systemId) = 0 |
| virtual bool | unparsedEntityDecl(const QString &name, const QString &publicId, const QString &systemId, const QString ¬ationName) = 0 |
상세 설명
애플리케이션에서 표기법 및 구문 분석되지 않은 엔티티에 대한 정보가 필요한 경우, 이 인터페이스를 구현하고 QXmlReader::setDTDHandler()를 통해 인스턴스를 등록할 수 있습니다.
이 인터페이스에는 XML 권고 사항에서 프로세서가 보고하도록 요구하는 DTD 이벤트, 즉 각각 notationDecl() 및 unparsedEntityDecl()을 사용하는 표기법 및 구문 분석되지 않은 엔티티 선언만 포함된다는 점에 유의하십시오.
QXmlDeclHandler, QXmlContentHandler, QXmlEntityResolver, QXmlErrorHandler 및 QXmlLexicalHandler도 참조하십시오 .
멤버 함수 문서
[virtual noexcept] QXmlDTDHandler::~QXmlDTDHandler()
DTD 핸들러를 삭제합니다.
[pure virtual] QString QXmlDTDHandler::errorString() const
핸들러 함수 중 하나라도 ` false`을 반환하면, 리더는 이 함수를 호출하여 오류 문자열을 가져옵니다.
[pure virtual] bool QXmlDTDHandler::notationDecl(const QString &name, const QString &publicId, const QString &systemId)
리더는 표기법 선언을 파싱한 후 이 함수를 호출합니다.
인자 ` name `는 표기법 이름이고, ` publicId `는 표기법의 공용 식별자이며, ` systemId `는 표기법의 시스템 식별자입니다.
이 함수가 false 를 반환하면 리더는 구문 분석을 중단하고 오류를 보고합니다. 리더는 errorString() 함수를 사용하여 오류 메시지를 가져옵니다.
[pure virtual] bool QXmlDTDHandler::unparsedEntityDecl(const QString &name, const QString &publicId, const QString &systemId, const QString ¬ationName)
리더는 구문 분석되지 않은 엔티티 선언을 발견하면 이 함수를 호출합니다.
인자 ` name `는 구문 분석되지 않은 엔티티의 이름이고, ` publicId `는 엔티티의 공용 식별자이며, ` systemId `는 엔티티의 시스템 식별자이고, ` notationName `는 관련 표기법의 이름입니다.
이 함수가 false 를 반환하면 리더는 구문 분석을 중지하고 오류를 보고합니다. 리더는 errorString() 함수를 사용하여 오류 메시지를 가져옵니다.
© 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.