Sophie

Sophie

distrib > * > 2009.0 > i586 > by-pkgid > a6711891ce757817bba854bf3f25205a > files > 2463

qtjambi-doc-4.3.3-3mdv2008.1.i586.rpm

<class name="QXmlDefaultHandler" doc="/**
&lt;p&gt;The &lt;a href=&quot;QXmlDefaultHandler.html#QXmlDefaultHandler()&quot;&gt;&lt;tt&gt;QXmlDefaultHandler&lt;/tt&gt;&lt;/a&gt; class provides a default implementation of all the XML handler classes.&lt;/p&gt;
&lt;p&gt;This class gathers together the features of the specialized handler classes, making it a convenient starting point when implementing custom handlers for subclasses of &lt;a href=&quot;QXmlReader.html&quot;&gt;&lt;tt&gt;QXmlReader&lt;/tt&gt;&lt;/a&gt;, particularly &lt;a href=&quot;QXmlSimpleReader.html&quot;&gt;&lt;tt&gt;QXmlSimpleReader&lt;/tt&gt;&lt;/a&gt;. The virtual functions from each of the base classes are reimplemented in this class, providing sensible default behavior for many common cases. By subclassing this class, and overriding these functions, you can concentrate on implementing the parts of the handler relevant to your application.&lt;/p&gt;
&lt;p&gt;The XML reader must be told which handler to use for different kinds of events during parsing. This means that, although &lt;a href=&quot;QXmlDefaultHandler.html#QXmlDefaultHandler()&quot;&gt;&lt;tt&gt;QXmlDefaultHandler&lt;/tt&gt;&lt;/a&gt; provides default implementations of functions inherited from all its base classes, we can still use specialized handlers for particular kinds of events.&lt;/p&gt;
&lt;p&gt;For example, &lt;a href=&quot;QXmlDefaultHandler.html#QXmlDefaultHandler()&quot;&gt;&lt;tt&gt;QXmlDefaultHandler&lt;/tt&gt;&lt;/a&gt; subclasses both &lt;a href=&quot;QXmlContentHandler.html&quot;&gt;&lt;tt&gt;QXmlContentHandler&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QXmlErrorHandler.html&quot;&gt;&lt;tt&gt;QXmlErrorHandler&lt;/tt&gt;&lt;/a&gt;, so by subclassing it we can use the same handler for both of the following reader functions:&lt;/p&gt;
&lt;pre&gt;        xmlReader.setContentHandler(handler);
        xmlReader.setErrorHandler(handler);&lt;/pre&gt;
&lt;p&gt;Since the reader will inform the handler of parsing errors, it is necessary to reimplement QXmlErrorHandler::fatalError() if, for example, we want to stop parsing when such an error occurs:&lt;/p&gt;
&lt;pre&gt;    bool Handler::fatalError (const QXmlParseException &amp;amp; exception)
    {
        qWarning() &amp;lt;&amp;lt; &amp;quot;Fatal error on line&amp;quot; &amp;lt;&amp;lt; exception.lineNumber()
                   &amp;lt;&amp;lt; &amp;quot;, column&amp;quot; &amp;lt;&amp;lt; exception.columnNumber() &amp;lt;&amp;lt; &amp;quot;:&amp;quot;
                   &amp;lt;&amp;lt; exception.message();

        return false;
    }&lt;/pre&gt;
&lt;p&gt;The above function returns false, which tells the reader to stop parsing. To continue to use the same reader, it is necessary to create a new handler instance, and set up the reader to use it in the manner described above.&lt;/p&gt;
&lt;p&gt;It is useful to examine some of the functions inherited by &lt;a href=&quot;QXmlDefaultHandler.html#QXmlDefaultHandler()&quot;&gt;&lt;tt&gt;QXmlDefaultHandler&lt;/tt&gt;&lt;/a&gt;, and consider why they might be reimplemented in a custom handler. Custom handlers will typically reimplement QXmlContentHandler::startDocument() to prepare the handler for new content. Document elements and the text within them can be processed by reimplementing QXmlContentHandler::startElement(), QXmlContentHandler::endElement(), and QXmlContentHandler::characters(). You may want to reimplement QXmlContentHandler::endDocument() to perform some finalization or validation on the content once the document has been read completely.&lt;/p&gt;

@see &lt;a href=&quot;QXmlDTDHandler.html&quot;&gt;&lt;tt&gt;QXmlDTDHandler&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QXmlDeclHandler.html&quot;&gt;&lt;tt&gt;QXmlDeclHandler&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QXmlContentHandler.html&quot;&gt;&lt;tt&gt;QXmlContentHandler&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QXmlEntityResolver.html&quot;&gt;&lt;tt&gt;QXmlEntityResolver&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QXmlErrorHandler.html&quot;&gt;&lt;tt&gt;QXmlErrorHandler&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QXmlLexicalHandler.html&quot;&gt;&lt;tt&gt;QXmlLexicalHandler&lt;/tt&gt;&lt;/a&gt;
@see Introduction to SAX2&lt;/tt&gt; */">
    <method name="public QXmlDefaultHandler()" doc="/**
&lt;p&gt;Constructs a handler for use with subclasses of &lt;a href=&quot;QXmlReader.html&quot;&gt;&lt;tt&gt;QXmlReader&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
 */"/>
    <method name="public boolean attributeDecl(java.lang.String eName, java.lang.String aName, java.lang.String type, java.lang.String valueDefault, java.lang.String value)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean characters(java.lang.String ch)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean comment(java.lang.String ch)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean endCDATA()" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean endDTD()" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean endDocument()" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean endEntity(java.lang.String name)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean endPrefixMapping(java.lang.String prefix)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean error(com.trolltech.qt.xml.QXmlParseException exception)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public java.lang.String errorString()" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean externalEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean fatalError(com.trolltech.qt.xml.QXmlParseException exception)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean ignorableWhitespace(java.lang.String ch)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean internalEntityDecl(java.lang.String name, java.lang.String value)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean notationDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean processingInstruction(java.lang.String target, java.lang.String data)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean resolveEntity(java.lang.String publicId, java.lang.String systemId, com.trolltech.qt.xml.QXmlInputSource ret)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public void setDocumentLocator(com.trolltech.qt.xml.QXmlLocator locator)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean skippedEntity(java.lang.String name)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean startCDATA()" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean startDocument()" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, com.trolltech.qt.xml.QXmlAttributes atts)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean startEntity(java.lang.String name)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean startPrefixMapping(java.lang.String prefix, java.lang.String uri)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean unparsedEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId, java.lang.String notationName)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean warning(com.trolltech.qt.xml.QXmlParseException exception)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
</class>