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

📄 qxmlcontenthandler.html

📁 QT 下载资料仅供参考
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/reggie/tmp/qt-3.0-reggie-5401/qt-x11-commercial-3.0.5/src/xml/qxml.cpp:1162 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>QXmlContentHandler Class</title><style type="text/css"><!--h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }a:link { color: #004faf; text-decoration: none }a:visited { color: #672967; text-decoration: none }body { background: #ffffff; color: black; }--></style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr bgcolor="#E5E5E5"><td valign=center> <a href="index.html"><font color="#004faf">Home</font></a> | <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a> | <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a> | <a href="annotated.html"><font color="#004faf">Annotated</font></a> | <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a> | <a href="functions.html"><font color="#004faf">Functions</font></a></td><td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QXmlContentHandler Class Reference<br><small>[<a href="xml.html">XML module</a>]</small></h1><p>The QXmlContentHandler class provides an interface to reportthe logical content of XML data.<a href="#details">More...</a><p><tt>#include &lt;<a href="qxml-h.html">qxml.h</a>&gt;</tt><p>Inherited by <a href="qxmldefaulthandler.html">QXmlDefaultHandler</a>.<p><a href="qxmlcontenthandler-members.html">List of all member functions.</a><h2>Public Members</h2><ul><li><div class=fn>virtual void <a href="#setDocumentLocator"><b>setDocumentLocator</b></a> ( QXmlLocator&nbsp;*&nbsp;locator ) = 0</div></li><li><div class=fn>virtual bool <a href="#startDocument"><b>startDocument</b></a> () = 0</div></li><li><div class=fn>virtual bool <a href="#endDocument"><b>endDocument</b></a> () = 0</div></li><li><div class=fn>virtual bool <a href="#startPrefixMapping"><b>startPrefixMapping</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;prefix, const&nbsp;QString&nbsp;&amp;&nbsp;uri ) = 0</div></li><li><div class=fn>virtual bool <a href="#endPrefixMapping"><b>endPrefixMapping</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;prefix ) = 0</div></li><li><div class=fn>virtual bool <a href="#startElement"><b>startElement</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;namespaceURI, const&nbsp;QString&nbsp;&amp;&nbsp;localName, const&nbsp;QString&nbsp;&amp;&nbsp;qName, const&nbsp;QXmlAttributes&nbsp;&amp;&nbsp;atts ) = 0</div></li><li><div class=fn>virtual bool <a href="#endElement"><b>endElement</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;namespaceURI, const&nbsp;QString&nbsp;&amp;&nbsp;localName, const&nbsp;QString&nbsp;&amp;&nbsp;qName ) = 0</div></li><li><div class=fn>virtual bool <a href="#characters"><b>characters</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;ch ) = 0</div></li><li><div class=fn>virtual bool <a href="#ignorableWhitespace"><b>ignorableWhitespace</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;ch ) = 0</div></li><li><div class=fn>virtual bool <a href="#processingInstruction"><b>processingInstruction</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;target, const&nbsp;QString&nbsp;&amp;&nbsp;data ) = 0</div></li><li><div class=fn>virtual bool <a href="#skippedEntity"><b>skippedEntity</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;name ) = 0</div></li><li><div class=fn>virtual QString <a href="#errorString"><b>errorString</b></a> () = 0</div></li></ul><hr><a name="details"></a><h2>Detailed Description</h2>The QXmlContentHandler class provides an interface to reportthe logical content of XML data.<p> <p> If the application needs to be informed of basic parsing events, itimplements this interface and sets it with <a href="qxmlreader.html#setContentHandler">QXmlReader::setContentHandler</a>().The reader reports basic document-related events like the start and end ofelements and character data through this interface.<p> The order of events in this interface is very important, and mirrors theorder of information in the document itself. For example, all of an element'scontent (character data, processing instructions, and/or sub-elements)appears, in order, between the <a href="#startElement">startElement</a>() event and the corresponding<a href="#endElement">endElement</a>() event.<p> The class <a href="qxmldefaulthandler.html">QXmlDefaultHandler</a> provides a default implementation forthis interface; subclassing from the QXmlDefaultHandler class isvery convenient if you only want to be informed of some parsing events.<p> The <a href="#startDocument">startDocument</a>() function is called at the start of the document,and <a href="#endDocument">endDocument</a>() is called at the end. Before parsing begins<a href="#setDocumentLocator">setDocumentLocator</a>() is called. For each elementstartElement() is called, with endElement() being called at the endof each element. The <a href="#characters">characters</a>() function is called with chunks ofcharacter data; <a href="#ignorableWhitespace">ignorableWhitespace</a>() is calledwith chunks of whitespace and <a href="#processingInstruction">processingInstruction</a>() is called withprocessing instructions. If an entity is skipped <a href="#skippedEntity">skippedEntity</a>() iscalled. At the beginning of prefix-URI scopes <a href="#startPrefixMapping">startPrefixMapping</a>()is called.<p> See also the <a href="xml.html#sax2Intro">Introduction to SAX2</a>.<p> <p>See also <a href="qxmldtdhandler.html">QXmlDTDHandler</a>, <a href="qxmldeclhandler.html">QXmlDeclHandler</a>, <a href="qxmlentityresolver.html">QXmlEntityResolver</a>, <a href="qxmlerrorhandler.html">QXmlErrorHandler</a>, <a href="qxmllexicalhandler.html">QXmlLexicalHandler</a> and <a href="xml-tools.html">XML</a>.<hr><h2>Member Function Documentation</h2><h3 class=fn>bool <a name="characters"></a>QXmlContentHandler::characters ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;ch )<tt> [pure virtual]</tt></h3><p> The reader calls this function when it has parsed a chunk of characterdata (either normal character data or character data inside a CDATA section;if you have to distinguish between those two types you must use<a href="qxmllexicalhandler.html#startCDATA">QXmlLexicalHandler::startCDATA</a>() and <a href="qxmllexicalhandler.html#endCDATA">QXmlLexicalHandler::endCDATA</a>()).The character data is reported in <em>ch</em>.<p> Some readers report whitespace in element content using the<a href="#ignorableWhitespace">ignorableWhitespace</a>() function rather than using this one.<p> A reader may report the character data of an element in more thanone chunk; e.g. a reader might want to report "a&lt;b" in three<a href="#characters">characters</a>() events ("a ", "&lt;" and " b").<p> If this function returns FALSE the reader stops parsing and reportsan error. The reader uses the function <a href="#errorString">errorString</a>() to get the errormessage.<h3 class=fn>bool <a name="endDocument"></a>QXmlContentHandler::endDocument ()<tt> [pure virtual]</tt></h3><p> The reader calls this function after it has finished parsing. Itis called just once, and is the last handler function called. It iscalled after the reader has read all input or has abandoned parsingbecause of a fatal error.<p> If this function returns FALSE the reader stops parsing and reportsan error. The reader uses the function <a href="#errorString">errorString</a>() to get the errormessage.<p> <p>See also <a href="#startDocument">startDocument</a>().<h3 class=fn>bool <a name="endElement"></a>QXmlContentHandler::endElement ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;namespaceURI, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;localName, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;qName )<tt> [pure virtual]</tt></h3><p> The reader calls this function when it has parsed an end element tagwith the qualified name <em>qName</em>, the local name <em>localName</em> andthe namespace URI <em>namespaceURI</em>.<p> If this function returns FALSE the reader stops parsing and reportsan error. The reader uses the function <a href="#errorString">errorString</a>() to get the errormessage.<p> See also the <a href="xml.html#sax2Namespaces">namespace description</a>.<p> <p>See also <a href="#startElement">startElement</a>().

⌨️ 快捷键说明

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