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 サブシステムは、エラーを検出するとこのクラスのインスタンスを構築します。エラーが発生した場所は、systemId()、publicId()、lineNumber() およびcolumnNumber() と、エラーmessage() を使用して取得できます。考えられるエラー・メッセージは以下のとおり:

  • 「エラーは発生しませんでした。
  • 「コンシューマーが引き起こしたエラー
  • 「予期せぬファイルの終了
  • 「複数の文書タイプ定義"
  • 「要素の解析中にエラーが発生しました。
  • 「タグの不一致
  • "コンテンツの解析中にエラーが発生しました"
  • 「予期しない文字
  • "処理命令の名前が無効"
  • "XML宣言の読み取り中に予想されたバージョン"
  • 「スタンドアロン宣言の値が間違っている
  • 「XML 宣言の読み取り中にエンコード宣言またはスタンドアロン宣言が予期されました。
  • 「XML 宣言の読み取り中にスタンドアロン宣言が予期されました。
  • "文書型定義の解析中にエラーが発生しました"
  • "文字が予想される"
  • "コメントの解析中にエラーが発生しました"
  • "参照の解析中にエラーが発生しました"
  • "内部一般実体参照が DTD で許可されていない"
  • "外部解析された一般実体参照が属性値で許可されていない"
  • "外部解析された一般実体参照が DTD で許可されていません"
  • "解析されていない実体参照 n 誤ったコンテキスト"
  • "再帰エンティティ"
  • "外部エンティティのテキスト宣言のエラー"

これらのエラー・メッセージをアプリケーションのユーザーに表示する場合は、明示的に翻訳しない限り、英語で表示されることに注意してください。

QXmlErrorHandler およびQXmlReaderも参照して ください。

メンバー関数ドキュメント

[explicit] QXmlParseException::QXmlParseException(const QString &name = QString(), int c = -1, int l = -1, const QString &p = QString(), const QString &s = QString())

c 、行l 、公開識別子p 、システム識別子s のエラー文字列name を持つ解析例外を構築する。

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.