QXmlParseException Class
QXmlParseException 클래스는 QXmlErrorHandler 인터페이스의 오류를 보고하는 데 사용됩니다. 더 보기...
헤더: | #include <QXmlParseException> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Core5Compat) target_link_libraries(mytarget PRIVATE Qt6::Core5Compat) |
qmake: | QT += core5compat |
참고: 이 클래스의 모든 함수는 재진입합니다.
공용 함수
QXmlParseException(const QString &name = QString(), int c = -1, int l = -1, const QString &p = QString(), const QString &s = QString()) | |
QXmlParseException(const QXmlParseException &other) | |
~QXmlParseException() | |
int | columnNumber() const |
int | lineNumber() const |
QString | message() const |
QString | publicId() const |
QString | systemId() const |
상세 설명
XML 서브시스템은 오류를 감지하면 이 클래스의 인스턴스를 생성합니다. 오류 message()와 함께 systemId(), publicId(), lineNumber() 및 columnNumber()를 사용하여 오류가 발생한 위치를 검색할 수 있습니다. 가능한 오류 메시지는 다음과 같습니다:
- "오류 발생 없음"
- "소비자에 의해 트리거된 오류"
- "예기치 않은 파일 끝"
- "둘 이상의 문서 유형 정의"
- "요소 구문 분석 중 오류 발생"
- "태그 불일치"
- "콘텐츠를 구문 분석하는 동안 오류가 발생했습니다"
- "예기치 않은 문자"
- "잘못된 처리 명령어 이름"
- "XML 선언을 읽는 동안 예상되는 버전"
- "독립형 선언에 잘못된 값"
- "XML 선언을 읽는 동안 인코딩 선언 또는 독립형 선언이 예상됨"
- "XML 선언을 읽는 동안 독립형 선언이 예상됨"
- "문서 유형 정의를 구문 분석하는 동안 오류가 발생했습니다."
- "문자가 예상됩니다"
- "주석을 구문 분석하는 동안 오류가 발생했습니다."
- "참조를 구문 분석하는 동안 오류가 발생했습니다."
- "DTD에서 허용되지 않는 내부 일반 엔티티 참조"
- "속성 값에 허용되지 않는 외부 구문 분석된 일반 엔티티 참조"
- "DTD에서 외부 구문 분석된 일반 엔티티 참조가 허용되지 않음"
- "구문 분석되지 않은 엔티티 참조가 잘못된 컨텍스트"
- "재귀적 엔티티"
- "외부 엔티티의 텍스트 선언에 오류"
애플리케이션 사용자에게 이러한 오류 메시지를 표시하려면 명시적으로 번역하지 않는 한 영어로 표시된다는 점에 유의하세요.
QXmlErrorHandler 및 QXmlReader 을참조하세요 .
멤버 함수 문서
[explicit]
QXmlParseException::QXmlParseException(const QString &name = QString(), int c = -1, int l = -1, const QString &p = QString(), const QString &s = QString())
열 c 에 대한 오류 문자열 name 과 공개 식별자 p 및 시스템 식별자 s 에 대한 줄 l 을 사용하여 구문 분석 예외를 구성합니다.
QXmlParseException::QXmlParseException(const QXmlParseException &other)
other 의 복사본을 만듭니다.
[noexcept]
QXmlParseException::~QXmlParseException()
QXmlParseException 를 파괴합니다.
int QXmlParseException::columnNumber() const
오류가 발생한 열 번호를 반환합니다.
int QXmlParseException::lineNumber() const
오류가 발생한 줄 번호를 반환합니다.
QString QXmlParseException::message() const
오류 메시지를 반환합니다.
QString QXmlParseException::publicId() const
오류가 발생한 공개 식별자를 반환합니다.
QString QXmlParseException::systemId() const
오류가 발생한 시스템 식별자를 반환합니다.
© 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.