返回介绍

QXmlDTDHandler Class

发布于 2019-10-04 15:04:16 字数 2709 浏览 932 评论 0 收藏 0

The QXmlDTDHandler class provides an interface to report DTD content of XML data. More...

#include <qxml.h>

Inherited by QXmlDefaultHandler.

List of all member functions.

Public Members

  • virtual bool notationDecl ( constQString&name, constQString&publicId, constQString&systemId ) = 0
  • virtual bool unparsedEntityDecl ( constQString&name, constQString&publicId, constQString&systemId, constQString&notationName ) = 0
  • virtual QString errorString () = 0

Detailed Description

The QXmlDTDHandler class provides an interface to report DTD content of XML data.

If an application needs information about notations and unparsed entities, it can implement this interface and register an instance with QXmlReader::setDTDHandler().

Note that this interface includes only those DTD events that the XML recommendation requires processors to report, i.e. notation and unparsed entity declarations using notationDecl() and unparsedEntityDecl() respectively.

See also the Introduction to SAX2.

See also QXmlDeclHandler, QXmlContentHandler, QXmlEntityResolver, QXmlErrorHandler, QXmlLexicalHandler and XML.


Member Function Documentation

QString QXmlDTDHandler::errorString () [pure virtual]

The reader calls this function to get an error string if any of the handler functions returns FALSE.

bool QXmlDTDHandler::notationDecl ( constQString&name, constQString&publicId, constQString&systemId ) [pure virtual]

The reader calls this function when it has parsed a notation declaration.

The argument name is the notation name, publicId is the notations's public identifier and systemId is the notations's system identifier.

If this function returns FALSE the reader stops parsing and reports an error. The reader uses the function errorString() to get the error message.

bool QXmlDTDHandler::unparsedEntityDecl ( constQString&name, constQString&publicId, constQString&systemId, constQString&notationName ) [pure virtual]

The reader calls this function when it finds an unparsed entity declaration.

The argument name is the unparsed entity's name, publicId is the entity's public identifier, systemId is the entity's system identifier and notationName is the name of the associated notation.

If this function returns FALSE the reader stops parsing and reports an error. The reader uses the function errorString() to get the error message.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文