QXmlLexicalHandler(3qt)

NAME
QXmlLexicalHandler - Interface to report the lexical content of XML data

#include <qxml.h>

Inherited by QXmlDefaultHandler.

  Public Members
virtual bool startDTD ( const QString & name, const QString & publicId, const QString & systemId )
virtual bool endDTD ()
virtual bool startEntity ( const QString & name )
virtual bool endEntity ( const QString & name )
virtual bool startCDATA ()
virtual bool endCDATA ()
virtual bool comment ( const QString & ch )
virtual QString errorString ()

DESCRIPTION
The QXmlLexicalHandler class provides an interface to report the lexical content of XML data.

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's design is based on the the SAX2 extension LexicalHandler.

The interface provides startDTD(), endDTD(), startEntity(), endEntity(), startCDATA(), endCDATA() and comment() functions.

See also the Introduction to SAX2.

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

MEMBER FUNCTION DOCUMENTATION

bool QXmlLexicalHandler::comment ( const QString & ch ) [virtual]
The reader calls this function to report an XML comment anywhere in the document. It reports the text of the comment in ch.

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 QXmlLexicalHandler::endCDATA () [virtual]
The reader calls this function to report the end of a CDATA section.

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

See also startCDATA().

bool QXmlLexicalHandler::endDTD () [virtual]
The reader calls this function to report the end of a DTD declaration, if any.

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

See also startDTD().

bool QXmlLexicalHandler::endEntity ( const QString & name ) [virtual]
The reader calls this function to report the end of an entity with the name name.

For every call of startEntity(), there is a corresponding call of endEntity(). The calls of startEntity() and endEntity() are properly nested.

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

See also startEntity() and QXmlSimpleReader::setFeature().

QString QXmlLexicalHandler::errorString () [virtual]
The reader calls this function to get an error string if any of the handler functions returns FALSE.

bool QXmlLexicalHandler::startCDATA () [virtual]
The reader calls this function to report the start of a CDATA section. The content of the CDATA section is reported through the QXmlContentHandler::characters() function. This function is intended only to report the boundary.

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

See also endCDATA().

bool QXmlLexicalHandler::startDTD ( const QString & name, const QString & publicId, const QString & systemId ) [virtual]
The reader calls this function to report the start of a DTD declaration, if any. It reports the name of the document type in name, the public identifier in publicId and the system identifier in systemId.

If the public identifier and the system identifier is missing, the reader sets the publicId and systemId to QString::null.

All declarations reported through QXmlDTDHandler or QXmlDeclHandler appear between the startDTD() and endDTD() calls.

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

See also endDTD().

bool QXmlLexicalHandler::startEntity ( const QString & name ) [virtual]
The reader calls this function to report the start of an entity with the name name.

Note that if the entity is unknown, the reader reports it through QXmlContentHandler::skippedEntity() and not throught this function.

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

See also endEntity() and QXmlSimpleReader::setFeature().

SEE ALSO
http://doc.trolltech.com/qxmllexicalhandler.html http://www.trolltech.com/faq/tech.html

COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.

BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you.

The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech.

If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qxmllexicalhandler.3qt) and the Qt version (3.0.0-beta6).