The QXmlReader class provides an interface for XML readers (i.e. parsers). More...
#include <qxml.h>
The QXmlReader class provides an interface for XML readers (i.e. parsers).
XML
This abstract class describes an interface for all XML readers in Qt. At the moment there is only one implementation of a reader included in the XML module of Qt (QXmlSimpleReader). In future releases there might be more readers with different properties available (e.g. a validating parser).
The design of the XML classes follow the SAX2 java interface. It was adopted to fit into the Qt naming conventions; so 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 from. Since you are normally interested in certain contents of the XML document, the reader reports those contents through special handler classes (QXmlDTDHandler, QXmlDeclHandler, QXmlContentHandler, QXmlEntityResolver, QXmlErrorHandler and QXmlLexicalHandler).
You have to subclass these classes. Since the handler classes describe only interfaces you must implement all functions; there is a class (QXmlDefaultHandler) to make this easier; it implements a default behaviour (do nothing) for all functions.
For getting started see also the Quick start.
|
pure virtual |
Returns the content handler or 0 if none was set.
Implemented in QXmlSimpleReader.
|
pure virtual |
Returns the declaration handler or 0 if none was set.
Implemented in QXmlSimpleReader.
|
pure virtual |
Returns the DTD handler or 0 if none was set.
Implemented in QXmlSimpleReader.
|
pure virtual |
Returns the entity resolver or 0 if none was set.
Implemented in QXmlSimpleReader.
|
pure virtual |
Returns the error handler or 0 if none was set
Implemented in QXmlSimpleReader.
If the reader has the feature name, this function returns the value of the feature.
If the reader has not the feature name, the return value may be anything.
If ok is not 0, then ok is set to TRUE if the reader has the feature name, otherwise ok is set to FALSE.
Implemented in QXmlSimpleReader.
Returns TRUE
if the reader has the feature name, otherwise FALSE.
Implemented in QXmlSimpleReader.
Returns TRUE if the reader has the property name, otherwise FALSE.
Implemented in QXmlSimpleReader.
|
pure virtual |
Returns the lexical handler or 0 if none was set.
Implemented in QXmlSimpleReader.
|
pure virtual |
Parses the XML document input. Returns TRUE if the parsing was successful, otherwise FALSE.
Parses the XML document at the location systemId. Returns TRUE if the parsing was successful, otherwise FALSE.
Implemented in QXmlSimpleReader.
If the reader has the property name, this function returns the value of the property.
If the reader has not the property name, the return value is 0.
If ok is not 0, then ok is set to TRUE if the reader has the property name, otherwise ok is set to FALSE.
Implemented in QXmlSimpleReader.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Sets the feature name to value. If the reader has not the feature name, this value is ignored.
Implemented in QXmlSimpleReader.
|
pure virtual |
|
pure virtual |
Sets the property name to value. If the reader has not the property name, this value is ignored.
Implemented in QXmlSimpleReader.