Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QXmlLexicalHandler Class Reference
[QtXml module]

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

 #include <QXmlLexicalHandler>

Inherited by QXmlDefaultHandler.

Note: All the functions in this class are reentrant.

Public Functions


Detailed 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 the startDTD(), endDTD(), startEntity(), endEntity(), startCDATA(), endCDATA() and comment() functions.

See also QXmlDTDHandler, QXmlDeclHandler, QXmlContentHandler, QXmlEntityResolver, QXmlErrorHandler, and Introduction to SAX2.


Member Function Documentation

QXmlLexicalHandler::~QXmlLexicalHandler ()   [virtual]

Destroys the lexical handler.

bool QXmlLexicalHandler::comment ( const QString & ch )   [pure 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 ()   [pure 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() and QXmlContentHandler::characters().

bool QXmlLexicalHandler::endDTD ()   [pure 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 )   [pure virtual]

The reader calls this function to report the end of an entity called name.

For every startEntity() call, there is a corresponding endEntity() call. The calls to 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(), QXmlContentHandler::skippedEntity(), and QXmlSimpleReader::setFeature().

QString QXmlLexicalHandler::errorString () const   [pure virtual]

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

bool QXmlLexicalHandler::startCDATA ()   [pure 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 )   [pure 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 is missing, publicId is set to an empty string. If the system identifier is missing, systemId is set to an empty string. Note that it is not valid XML to have a public identifier but no system identifier; in such cases a parse error will occur.

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 )   [pure virtual]

The reader calls this function to report the start of an entity called name.

Note that if the entity is unknown, the reader reports it through QXmlContentHandler::skippedEntity() and not through 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().

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 59
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. La rubrique Qt a besoin de vous ! 1
Page suivante

Le Qt Labs au hasard

Logo

Construire l'avenir : (ré-)introduction aux composants de Qt Quick

Les Qt Labs sont les laboratoires des développeurs de Qt, où ils peuvent partager des impressions sur le framework, son utilisation, ce que pourrait être son futur. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 4.2
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web