Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

QXmlParseException Class

TheQXmlParseException class is used to report errors with theQXmlErrorHandler interface.More...

Header:#include <QXmlParseException>

Note: All functions in this class arereentrant.

Public Functions

QXmlParseException(const QString & name = QString(), int c = -1, int l = -1, const QString & p = QString(), const QString & s = QString())
QXmlParseException(const QXmlParseException & other)
~QXmlParseException()
intcolumnNumber() const
intlineNumber() const
QStringmessage() const
QStringpublicId() const
QStringsystemId() const

Detailed Description

TheQXmlParseException class is used to report errors with theQXmlErrorHandler interface.

The XML subsystem constructs an instance of this class when it detects an error. You can retrieve the place where the error occurred usingsystemId(),publicId(),lineNumber() andcolumnNumber(), along with the errormessage(). The possible error messages are:

  • "no error occurred"
  • "error triggered by consumer"
  • "unexpected end of file"
  • "more than one document type definition"
  • "error occurred while parsing element"
  • "tag mismatch"
  • "error occurred while parsing content"
  • "unexpected character"
  • "invalid name for processing instruction"
  • "version expected while reading the XML declaration"
  • "wrong value for standalone declaration"
  • "encoding declaration or standalone declaration expected while reading the XML declaration"
  • "standalone declaration expected while reading the XML declaration"
  • "error occurred while parsing document type definition"
  • "letter is expected"
  • "error occurred while parsing comment"
  • "error occurred while parsing reference"
  • "internal general entity reference not allowed in DTD"
  • "external parsed general entity reference not allowed in attribute value"
  • "external parsed general entity reference not allowed in DTD"
  • "unparsed entity reference n wrong context"
  • "recursive entities"
  • "error in the text declaration of an external entity"

Note that, if you want to display these error messages to your application's users, they will be displayed in English unless they are explicitly translated.

See alsoQXmlErrorHandler andQXmlReader.

Member Function Documentation

QXmlParseException::QXmlParseException(constQString & name = QString(),int c = -1,int l = -1, constQString & p = QString(), constQString & s = QString())

Constructs a parse exception with the error stringname for columnc and linel for the public identifierp and the system identifiers.

QXmlParseException::QXmlParseException(constQXmlParseException & other)

Creates a copy ofother.

QXmlParseException::~QXmlParseException()

Destroys theQXmlParseException.

int QXmlParseException::columnNumber() const

Returns the column number where the error occurred.

int QXmlParseException::lineNumber() const

Returns the line number where the error occurred.

QString QXmlParseException::message() const

Returns the error message.

QString QXmlParseException::publicId() const

Returns the public identifier where the error occurred.

QString QXmlParseException::systemId() const

Returns the system identifier where the error occurred.

© 2016 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 theGNU 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.


[8]ページ先頭

©2009-2025 Movatter.jp