Eneboo - Documentación para desarrolladores
Métodos públicos
Referencia de la Clase QXmlReader

The QXmlReader class provides an interface for XML readers (i.e. parsers).XMLThis abstract class provides an interface for all of Qt's XML readers. Currently there is only one implementation of a reader included in Qt's XML module: QXmlSimpleReader. In future releases there might be more readers with different properties available (e.g. a validating parser). Más...

#include <qxml.h>

Diagrama de herencias de QXmlReader
QXmlSimpleReader QXmlSimpleReader

Lista de todos los miembros.

Métodos públicos

virtual bool feature (const QString &name, bool *ok=0) const =0
virtual void setFeature (const QString &name, bool value)=0
virtual bool hasFeature (const QString &name) const =0
virtual void * property (const QString &name, bool *ok=0) const =0
virtual void setProperty (const QString &name, void *value)=0
virtual bool hasProperty (const QString &name) const =0
virtual void setEntityResolver (QXmlEntityResolver *handler)=0
virtual QXmlEntityResolverentityResolver () const =0
virtual void setDTDHandler (QXmlDTDHandler *handler)=0
virtual QXmlDTDHandlerDTDHandler () const =0
virtual void setContentHandler (QXmlContentHandler *handler)=0
virtual QXmlContentHandlercontentHandler () const =0
virtual void setErrorHandler (QXmlErrorHandler *handler)=0
virtual QXmlErrorHandlererrorHandler () const =0
virtual void setLexicalHandler (QXmlLexicalHandler *handler)=0
virtual QXmlLexicalHandlerlexicalHandler () const =0
virtual void setDeclHandler (QXmlDeclHandler *handler)=0
virtual QXmlDeclHandlerdeclHandler () const =0
virtual bool parse (const QXmlInputSource &input)=0
virtual bool parse (const QXmlInputSource *input)=0
virtual bool feature (const QString &name, bool *ok=0) const =0
virtual void setFeature (const QString &name, bool value)=0
virtual bool hasFeature (const QString &name) const =0
virtual void * property (const QString &name, bool *ok=0) const =0
virtual void setProperty (const QString &name, void *value)=0
virtual bool hasProperty (const QString &name) const =0
virtual void setEntityResolver (QXmlEntityResolver *handler)=0
virtual QXmlEntityResolverentityResolver () const =0
virtual void setDTDHandler (QXmlDTDHandler *handler)=0
virtual QXmlDTDHandlerDTDHandler () const =0
virtual void setContentHandler (QXmlContentHandler *handler)=0
virtual QXmlContentHandlercontentHandler () const =0
virtual void setErrorHandler (QXmlErrorHandler *handler)=0
virtual QXmlErrorHandlererrorHandler () const =0
virtual void setLexicalHandler (QXmlLexicalHandler *handler)=0
virtual QXmlLexicalHandlerlexicalHandler () const =0
virtual void setDeclHandler (QXmlDeclHandler *handler)=0
virtual QXmlDeclHandlerdeclHandler () const =0
virtual bool parse (const QXmlInputSource &input)=0
virtual bool parse (const QXmlInputSource *input)=0

Descripción detallada

The QXmlReader class provides an interface for XML readers (i.e. parsers).

XML

This abstract class provides an interface for all of Qt's XML readers. Currently there is only one implementation of a reader included in Qt's XML module: QXmlSimpleReader. In future releases there might be more readers with different properties available (e.g. a validating parser).

The design of the XML classes follows the SAX2 Java interface, with the names adapted to fit Qt naming conventions. It should be very easy for anybody who has worked with SAX2 to get started with the Qt XML classes.

All readers use the class QXmlInputSource to read the input document. Since you are normally interested in particular content in the XML document, the reader reports the content through special handler classes (QXmlDTDHandler, QXmlDeclHandler, QXmlContentHandler, QXmlEntityResolver, QXmlErrorHandler and QXmlLexicalHandler), which you must subclass, if you want to process the contents.

Since the handler classes only describe interfaces you must implement all the functions. We provide the QXmlDefaultHandler class to make this easier: it implements a default behaviour (do nothing) for all functions, so you can subclass it and just implement the functions you are interested in.

Features and properties of the reader can be set with setFeature() and setProperty() respectively. You can set the reader to use your own subclasses with setEntityResolver(), setDTDHandler(), setContentHandler(), setErrorHandler(), setLexicalHandler() and setDeclHandler(). The parse itself is started with a call to parse().

Ver también:
QXmlSimpleReader

Documentación de las funciones miembro

QXmlContentHandler * QXmlReader::contentHandler ( ) const [pure virtual]

Returns the content handler or 0 if none was set.

Ver también:
setContentHandler()

Implementado en QXmlSimpleReader y QXmlSimpleReader.

virtual QXmlContentHandler* QXmlReader::contentHandler ( ) const [pure virtual]

Implementado en QXmlSimpleReader y QXmlSimpleReader.

QXmlDeclHandler * QXmlReader::declHandler ( ) const [pure virtual]

Returns the declaration handler or 0 if none was set.

Ver también:
setDeclHandler()

Implementado en QXmlSimpleReader y QXmlSimpleReader.

virtual QXmlDeclHandler* QXmlReader::declHandler ( ) const [pure virtual]

Implementado en QXmlSimpleReader y QXmlSimpleReader.

QXmlDTDHandler * QXmlReader::DTDHandler ( ) const [pure virtual]

Returns the DTD handler or 0 if none was set.

Ver también:
setDTDHandler()

Implementado en QXmlSimpleReader y QXmlSimpleReader.

virtual QXmlDTDHandler* QXmlReader::DTDHandler ( ) const [pure virtual]

Implementado en QXmlSimpleReader y QXmlSimpleReader.

QXmlEntityResolver * QXmlReader::entityResolver ( ) const [pure virtual]

Returns the entity resolver or 0 if none was set.

Ver también:
setEntityResolver()

Implementado en QXmlSimpleReader y QXmlSimpleReader.

virtual QXmlEntityResolver* QXmlReader::entityResolver ( ) const [pure virtual]

Implementado en QXmlSimpleReader y QXmlSimpleReader.

virtual QXmlErrorHandler* QXmlReader::errorHandler ( ) const [pure virtual]

Implementado en QXmlSimpleReader y QXmlSimpleReader.

QXmlErrorHandler * QXmlReader::errorHandler ( ) const [pure virtual]

Returns the error handler or 0 if none is set.

Ver también:
setErrorHandler()

Implementado en QXmlSimpleReader y QXmlSimpleReader.

bool QXmlReader::feature ( const QString name,
bool ok = 0 
) const [pure virtual]

If the reader has the feature called name, the feature's value is returned. If no such feature exists the return value is undefined.

If ok is not 0: *ok is set to TRUE if the reader has the feature called name; otherwise *ok is set to FALSE.

Ver también:
setFeature() hasFeature()

Implementado en QXmlSimpleReader y QXmlSimpleReader.

virtual bool QXmlReader::feature ( const QString name,
bool ok = 0 
) const [pure virtual]

Implementado en QXmlSimpleReader y QXmlSimpleReader.

virtual bool QXmlReader::hasFeature ( const QString name) const [pure virtual]

Implementado en QXmlSimpleReader y QXmlSimpleReader.

bool QXmlReader::hasFeature ( const QString name) const [pure virtual]

Returns TRUE if the reader has the feature called name; otherwise returns FALSE.

Ver también:
feature() setFeature()

Implementado en QXmlSimpleReader y QXmlSimpleReader.

bool QXmlReader::hasProperty ( const QString name) const [pure virtual]

Returns TRUE if the reader has the property name; otherwise returns FALSE.

Ver también:
property() setProperty()

Implementado en QXmlSimpleReader y QXmlSimpleReader.

virtual bool QXmlReader::hasProperty ( const QString name) const [pure virtual]

Implementado en QXmlSimpleReader y QXmlSimpleReader.

virtual QXmlLexicalHandler* QXmlReader::lexicalHandler ( ) const [pure virtual]

Implementado en QXmlSimpleReader y QXmlSimpleReader.

QXmlLexicalHandler * QXmlReader::lexicalHandler ( ) const [pure virtual]

Returns the lexical handler or 0 if none was set.

Ver también:
setLexicalHandler()

Implementado en QXmlSimpleReader y QXmlSimpleReader.

bool QXmlReader::parse ( const QXmlInputSource input) [pure virtual]

Implementado en QXmlSimpleReader y QXmlSimpleReader.

virtual bool QXmlReader::parse ( const QXmlInputSource input) [pure virtual]

Implementado en QXmlSimpleReader y QXmlSimpleReader.

virtual bool QXmlReader::parse ( const QXmlInputSource input) [pure virtual]

Implementado en QXmlSimpleReader y QXmlSimpleReader.

bool QXmlReader::parse ( const QXmlInputSource input) [pure virtual]

Reads an XML document from input and parses it. Returns TRUE if the parsing was successful; otherwise returns FALSE.

Implementado en QXmlSimpleReader y QXmlSimpleReader.

void * QXmlReader::property ( const QString name,
bool ok = 0 
) const [pure virtual]

If the reader has the property name, this function returns the value of the property; otherwise the return value is undefined.

If ok is not 0: if the reader has the name property *ok is set to TRUE; otherwise *ok is set to FALSE.

Ver también:
setProperty() hasProperty()

Implementado en QXmlSimpleReader y QXmlSimpleReader.

virtual void* QXmlReader::property ( const QString name,
bool ok = 0 
) const [pure virtual]

Implementado en QXmlSimpleReader y QXmlSimpleReader.

void QXmlReader::setContentHandler ( QXmlContentHandler handler) [pure virtual]

Sets the content handler to handler.

Ver también:
contentHandler()

Implementado en QXmlSimpleReader y QXmlSimpleReader.

virtual void QXmlReader::setContentHandler ( QXmlContentHandler handler) [pure virtual]

Implementado en QXmlSimpleReader y QXmlSimpleReader.

virtual void QXmlReader::setDeclHandler ( QXmlDeclHandler handler) [pure virtual]

Implementado en QXmlSimpleReader y QXmlSimpleReader.

void QXmlReader::setDeclHandler ( QXmlDeclHandler handler) [pure virtual]

Sets the declaration handler to handler.

Ver también:
declHandler()

Implementado en QXmlSimpleReader y QXmlSimpleReader.

virtual void QXmlReader::setDTDHandler ( QXmlDTDHandler handler) [pure virtual]

Implementado en QXmlSimpleReader y QXmlSimpleReader.

void QXmlReader::setDTDHandler ( QXmlDTDHandler handler) [pure virtual]

Sets the DTD handler to handler.

Ver también:
DTDHandler()

Implementado en QXmlSimpleReader y QXmlSimpleReader.

void QXmlReader::setEntityResolver ( QXmlEntityResolver handler) [pure virtual]

Sets the entity resolver to handler.

Ver también:
entityResolver()

Implementado en QXmlSimpleReader y QXmlSimpleReader.

virtual void QXmlReader::setEntityResolver ( QXmlEntityResolver handler) [pure virtual]

Implementado en QXmlSimpleReader y QXmlSimpleReader.

virtual void QXmlReader::setErrorHandler ( QXmlErrorHandler handler) [pure virtual]

Implementado en QXmlSimpleReader y QXmlSimpleReader.

void QXmlReader::setErrorHandler ( QXmlErrorHandler handler) [pure virtual]

Sets the error handler to handler. Clears the error handler if handler is 0.

Ver también:
errorHandler()

Implementado en QXmlSimpleReader y QXmlSimpleReader.

virtual void QXmlReader::setFeature ( const QString name,
bool  value 
) [pure virtual]

Implementado en QXmlSimpleReader y QXmlSimpleReader.

void QXmlReader::setFeature ( const QString name,
bool  value 
) [pure virtual]

Sets the feature called name to the given value. If the reader doesn't have the feature nothing happens.

Ver también:
feature() hasFeature()

Implementado en QXmlSimpleReader y QXmlSimpleReader.

void QXmlReader::setLexicalHandler ( QXmlLexicalHandler handler) [pure virtual]

Sets the lexical handler to handler.

Ver también:
lexicalHandler()

Implementado en QXmlSimpleReader y QXmlSimpleReader.

virtual void QXmlReader::setLexicalHandler ( QXmlLexicalHandler handler) [pure virtual]

Implementado en QXmlSimpleReader y QXmlSimpleReader.

void QXmlReader::setProperty ( const QString name,
void *  value 
) [pure virtual]

Sets the property name to value. If the reader doesn't have the property nothing happens.

Ver también:
property() hasProperty()

Implementado en QXmlSimpleReader y QXmlSimpleReader.

virtual void QXmlReader::setProperty ( const QString name,
void *  value 
) [pure virtual]

Implementado en QXmlSimpleReader y QXmlSimpleReader.


La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'