⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qxml.cpp

📁 doxygen(一个自动从源代码生成文档的工具)的源代码
💻 CPP
📖 第 1 页 / 共 5 页
字号:
  an error. The reader will use the function errorString() to get the error  message that will be used for reporting the error.  \sa endDocument()*//*!  \fn bool QXmlContentHandler::endDocument()  The reader calls this function after he has finished the parsing. It  is only called once. It is the last function of all handler functions that is  called. It is called after the reader has read all input or has abandoned  parsing because of a fatal error.  If this function returns FALSE the reader will stop parsing and will report  an error. The reader will use the function errorString() to get the error  message that will be used for reporting the error.  \sa startDocument()*//*!  \fn bool QXmlContentHandler::startPrefixMapping( const QString& prefix, const QString& uri )  The reader calls this function to signal the begin of a prefix-URI  namespace mapping scope. This information is not necessary for normal  namespace processing since the reader automatically replaces prefixes for  element and attribute names.  Note that startPrefixMapping and endPrefixMapping calls are not guaranteed to  be properly nested relative to each-other: all startPrefixMapping events will  occur before the corresponding startElement event, and all endPrefixMapping  events will occur after the corresponding endElement event, but their order  is not otherwise guaranteed.  The argument \a prefix is the namespace prefix being declared and the  argument \a uri is the namespace URI the prefix is mapped to.  If this function returns FALSE the reader will stop parsing and will report  an error. The reader will use the function errorString() to get the error  message that will be used for reporting the error.  See also the <a href="xml-sax.html#namespaces">namespace description</a>.  \sa endPrefixMapping()*//*!  \fn bool QXmlContentHandler::endPrefixMapping( const QString& prefix )  The reader calls this function to signal the end of a prefix mapping.  If this function returns FALSE the reader will stop parsing and will report  an error. The reader will use the function errorString() to get the error  message that will be used for reporting the error.  See also the <a href="xml-sax.html#namespaces">namespace description</a>.  \sa startPrefixMapping()*//*!  \fn bool QXmlContentHandler::startElement( const QString& namespaceURI, const QString& localName, const QString& qName, const QXmlAttributes& atts )  The reader calls this function when he has parsed a start element tag.  There will be a corresponding endElement() call when the corresponding end  element tag was read. The startElement() and endElement() calls are always  nested correctly. Empty element tags (e.g. &lt;a/&gt;) are reported by  startElement() directly followed by a call to endElement().  The attribute list provided will contain only attributes with explicit  values. The attribute list will contain attributes used for namespace  declaration (i.e. attributes starting with xmlns) only if the  namespace-prefix property of the reader is TRUE.  The argument \a uri is the namespace URI, or the empty string if the element  has no namespace URI or if namespace processing is not being performed, \a  localName is the local name (without prefix), or the empty string if  namespace processing is not being performed, \a qName is the qualified name  (with prefix), or the empty string if qualified names are not available and  \a atts are the attributes attached to the element. If there are no  attributes, \a atts is an empty attributes object  If this function returns FALSE the reader will stop parsing and will report  an error. The reader will use the function errorString() to get the error  message that will be used for reporting the error.  See also the <a href="xml-sax.html#namespaces">namespace description</a>.  \sa endElement()*//*!  \fn bool QXmlContentHandler::endElement( const QString& namespaceURI, const QString& localName, const QString& qName )  The reader calls this function when he has parsed an end element tag.  If this function returns FALSE the reader will stop parsing and will report  an error. The reader will use the function errorString() to get the error  message that will be used for reporting the error.  See also the <a href="xml-sax.html#namespaces">namespace description</a>.  \sa startElement()*//*!  \fn bool QXmlContentHandler::characters( const QString& ch )  The reader calls this function when he has parsed a chunk of character  data (either normal character data or character data inside a CDATA section;  if you have to distinguish between those two types you have to use  QXmlLexicalHandler::startCDATA() and QXmlLexicalHandler::endCDATA() in  addition).  Some readers will report whitespace in element content using the  ignorableWhitespace() function rather than this one (QXmlSimpleReader will  do it not though).  A reader is allowed to report the character data of an element in more than  one chunk; e.g. a reader might want to report "a &amp;lt; b" in three  characters() events ("a ", "<" and " b").  If this function returns FALSE the reader will stop parsing and will report  an error. The reader will use the function errorString() to get the error  message that will be used for reporting the error.*//*!  \fn bool QXmlContentHandler::ignorableWhitespace( const QString& ch )  Some readers may use this function to report each chunk of whitespace in  element content (QXmlSimpleReader does not though).  If this function returns FALSE the reader will stop parsing and will report  an error. The reader will use the function errorString() to get the error  message that will be used for reporting the error.*//*!  \fn bool QXmlContentHandler::processingInstruction( const QString& target, const QString& data )  The reader calls this function when he has parsed a processing  instruction.  \a target is the target name of the processing instruction and \a data is the  data of the processing instruction.  If this function returns FALSE the reader will stop parsing and will report  an error. The reader will use the function errorString() to get the error  message that will be used for reporting the error.*//*!  \fn bool QXmlContentHandler::skippedEntity( const QString& name )  Some readers may skip entities if they have not seen the declarations (e.g.  because they are in an external DTD). If they do so they will report it by  calling this function.  If this function returns FALSE the reader will stop parsing and will report  an error. The reader will use the function errorString() to get the error  message that will be used for reporting the error.*//*!  \fn QString QXmlContentHandler::errorString()  The reader calls this function to get an error string if any of the handler  functions returns FALSE to him.*//*!  \class QXmlErrorHandler qxml.h  \brief The QXmlErrorHandler class provides an interface to report errors in  XML data.  \module XML  If the application is interested in reporting errors to the user or any other  customized error handling, you should subclass this class.  You can set the error handler with QXmlReader::setErrorHandler().  See also the <a href="xml.html#introSAX2">Introduction to SAX2</a>.  \sa QXmlDTDHandler QXmlDeclHandler QXmlContentHandler QXmlEntityResolver  QXmlLexicalHandler*//*!  \fn bool QXmlErrorHandler::warning( const QXmlParseException& exception )  A reader might use this function to report a warning. Warnings are conditions  that are not errors or fatal errors as defined by the XML 1.0 specification.  If this function returns FALSE the reader will stop parsing and will report  an error. The reader will use the function errorString() to get the error  message that will be used for reporting the error.*//*!  \fn bool QXmlErrorHandler::error( const QXmlParseException& exception )  A reader might use this function to report a recoverable error. A recoverable  error corresponds to the definiton of "error" in section 1.2 of the XML 1.0  specification.  The reader must continue to provide normal parsing events after invoking this  function.  If this function returns FALSE the reader will stop parsing and will report  an error. The reader will use the function errorString() to get the error  message that will be used for reporting the error.*//*!  \fn bool QXmlErrorHandler::fatalError( const QXmlParseException& exception )  A reader must use this function to report a non-recoverable error.  If this function returns TRUE the reader might try to go on parsing and  reporting further errors; but no regular parsing events are reported.*//*!  \fn QString QXmlErrorHandler::errorString()  The reader calls this function to get an error string if any of the handler  functions returns FALSE to him.*//*!  \class QXmlDTDHandler qxml.h  \brief The QXmlDTDHandler class provides an interface to report DTD content  of XML data.  \module XML  If an application needs information about notations and unparsed entities,  then the application implements this interface and registers an instance with  QXmlReader::setDTDHandler().  Note that this interface includes only those DTD events that the XML  recommendation requires processors to report: notation and unparsed entity  declarations.  See also the <a href="xml.html#introSAX2">Introduction to SAX2</a>.  \sa QXmlDeclHandler QXmlContentHandler QXmlEntityResolver QXmlErrorHandler  QXmlLexicalHandler*//*!  \fn bool QXmlDTDHandler::notationDecl( const QString& name, const QString& publicId, const QString& systemId )  The reader calls this function when he has parsed a notation  declaration.  The argument \a name is the notation name, \a publicId is the notations's  public identifier and \a systemId is the notations's system identifier.  If this function returns FALSE the reader will stop parsing and will report  an error. The reader will use the function errorString() to get the error  message that will be used for reporting the error.*//*!  \fn bool QXmlDTDHandler::unparsedEntityDecl( const QString& name, const QString& publicId, const QString& systemId, const QString& notationName )  The reader calls this function when he finds an unparsed entity declaration.  The argument \a name is the unparsed entity's name, \a publicId is the  entity's public identifier, \a systemId is the entity's system identifier and  \a notation is the name of the associated notation.  If this function returns FALSE the reader will stop parsing and will report  an error. The reader will use the function errorString() to get the error  message that will be used for reporting the error.*//*!  \fn QString QXmlDTDHandler::errorString()  The reader calls this function to get an error string if any of the handler  functions returns FALSE to him.*//*!  \class QXmlEntityResolver qxml.h  \brief The QXmlEntityResolver class provides an interface to resolve extern  entities contained in XML data.  \module XML  If an application needs to implement customized handling for external  entities, it must implement this interface and register it with  QXmlReader::setEntityResolver().  See also the <a href="xml.html#introSAX2">Introduction to SAX2</a>.  \sa QXmlDTDHandler QXmlDeclHandler QXmlContentHandler QXmlErrorHandler  QXmlLexicalHandler*//*!  \fn bool QXmlEntityResolver::resolveEntity( const QString& publicId, const QString& systemId, QXmlInputSource* ret )  The reader will call this function before he opens any external entity,  except the top-level document entity. The application may request the reader  to resolve the entity itself (\a ret is 0) or to use an entirely different  input source (\a ret points to the input source).  The reader will delete the input source \a ret when he no longer needs it. So  you should allocate it on the heap with \c new.  The argument \a publicId is the public identifier of the external entity, \a  systemId is the system identifier of the external entity and \a ret is the  return value of this function: if it is 0 the reader should resolve the  entity itself, if it is non-zero it must point to an input source which the  reader will use instead.  If this function returns FALSE the reader will stop parsing and will report  an error. The reader will use the function errorString() to get the error  message that will be used for reporting the error.*//*!  \fn QString QXmlEntityResolver::errorString()  The reader calls this function to get an error string if any of the handler  functions returns FALSE to him.*//*!  \class QXmlLexicalHandler qxml.h  \brief The QXmlLexicalHandler class provides an interface to report lexical  content of XML data.  \module XML  The events in the lexical handler apply to the entire document, not just to  the document element, and all lexical handler events appear between the  content handler's startDocument and endDocument events.  You can set the lexical handler with QXmlReader::setLexicalHandler().  This interface is designed after the SAX2 extension LexicalHandler. The  functions startEntity() and endEntity() are not included though.  See also the <a href="xml.html#introSAX2">Introduction to SAX2</a>.  \sa QXmlDTDHandler QXmlDeclHandler QXmlContentHandler QXmlEntityResolver  QXmlErrorHandler*//*!  \fn bool QXmlLexicalHandler::startDTD( const QString& name, const QString& publicId, const QString& systemId )  The reader calls this function to report the start of a DTD declaration, if  any.  All declarations reported through QXmlDTDHandler or QXmlDeclHandler appear  between the startDTD() and endDTD() calls.  If this function returns FALSE the reader will stop parsing and will report  an error. The reader will use the function errorString() to get the error  message that will be used for reporting the error.  \sa endDTD()*//*!  \fn bool QXmlLexicalHandler::endDTD()  The reader calls this function to report the end of a DTD declaration, if  any.  If this function returns FALSE the reader will stop parsing and will report  an error. The reader will use the function errorString() to get the error  message that will be used for reporting the error.  \sa startDTD()*//*!  \fn bool QXmlLexicalHandler::startCDATA()  The reader calls this function to report the start of a CDATA section. The  content of the CDATA section will be reported through the regular  QXmlContentHandler::characters(). This function is intended only to report  the boundary.  If this function returns FALSE the reader will stop parsing and will report  an error. The reader will use the function errorString() to get the error  message that will be used for reporting the error.  \sa endCDATA()*//*!  \fn bool QXmlLexicalHandler::endCDATA()  The reader calls this function to report the end of a CDATA section.  If this function returns FALSE the reader will stop parsing and will report  an error. The reader will use the function errorString() to get the error  message that will be used for reporting the error.  \sa startCDATA()*//*!  \fn bool QXmlLexicalHandler::comment( const QString& ch )  The reader calls this function to report an XML comment anywhere in the  document.  If this function returns FALSE the reader will stop parsing and will report  an error. The reader will use the function errorString() to get the error  message that will be used for reporting the error.*//*!  \fn QString QXmlLexicalHandler::errorString()  The reader calls this function to get an error string if any of the handler  functions returns FALSE to him.*//*!  \class QXmlDeclHandler qxml.h  \brief The QXmlDeclHandler class provides an interface to report declaration  content of XML data.  \module XML  You can set the declaration handler with QXmlReader::setDeclHandler().  This interface is designed after the SAX2 extension DeclHandler.  See also the <a href="xml.html#introSAX2">Introduction to SAX2</a>.  \sa QXmlDTDHandler QXmlContentHandler QXmlEntityResolver QXmlErrorHandler  QXmlLexicalHandler*//*!  \fn bool QXmlDeclHandler::attributeDecl( const QString& eName, const QString& aName, const QString& type, const QString& valueDefault, const QString& value )  The reader calls this function to report an attribute type declaration. Only  the effective (first) declaration for an attribute will be reported.  If this function returns FALSE the reader will stop parsing and will report  an error. The reader will use the function errorString() to get the error  message that will be used for reporting the error.*//*!  \fn bool QXmlDeclHandler::internalEntityDecl( const QString& name, const QString& value )  The reader calls this function to report an internal entity declaration. Only  the effective (first) declaration will be reported.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -