The QXmlSimpleReader class provides an implementation of a simple XML reader (i.e. parser). More...
#include <qxml.h>
Private Types | |
enum | EntityRecognitionContext { InContent, InAttributeValue, InEntityValue, InDTD } |
Private Attributes | |
QXmlContentHandler * | contentHnd |
QXmlErrorHandler * | errorHnd |
QXmlDTDHandler * | dtdHnd |
QXmlEntityResolver * | entityRes |
QXmlLexicalHandler * | lexicalHnd |
QXmlDeclHandler * | declHnd |
QChar | c |
int | lineNr |
int | columnNr |
int | pos |
int | namePos |
QChar | nameArray [256] |
QString | nameValue |
int | refPos |
QChar | refArray [256] |
QString | refValue |
int | stringPos |
QChar | stringArray [256] |
QString | stringValue |
QString | xml |
int | xmlLength |
QString | xmlRef |
QValueStack< QString > | tags |
QXmlSimpleReaderPrivate * | d |
Static Private Attributes | |
static const QChar | QEOF = QChar((ushort)0xffff) |
Friends | |
class | QXmlSimpleReaderPrivate |
class | QXmlLocator |
The QXmlSimpleReader class provides an implementation of a simple XML reader (i.e. parser).
XML
This XML reader is sufficient for simple parsing tasks. Here is a short list of the properties of this reader:
For getting started see also the Quick start.
|
private |
Enumerator | |
---|---|
InContent | |
InAttributeValue | |
InEntityValue | |
InDTD |
QXmlSimpleReader::QXmlSimpleReader | ( | ) |
Constructs a simple XML reader.
Definition at line 1904 of file qxml.cpp.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Returns TRUE if a entity with the name e exists, otherwise returns FALSE.
Definition at line 6045 of file qxml.cpp.
|
virtual |
|
virtual |
Gets the state of a feature.
Implements QXmlReader.
Definition at line 1936 of file qxml.cpp.
Returns TRUE if the class has a feature named feature, otherwise FALSE.
Implements QXmlReader.
Definition at line 1990 of file qxml.cpp.
Returns FALSE since this class does not support any properties.
Implements QXmlReader.
|
private |
Inits the data values.
Definition at line 6016 of file qxml.cpp.
Definition at line 548 of file qxml.h.
|
virtual |
|
inlineprivate |
Definition at line 592 of file qxml.h.
|
inlineprivate |
Definition at line 620 of file qxml.h.
|
inlineprivate |
Definition at line 645 of file qxml.h.
|
virtual |
Implements QXmlReader.
Definition at line 2077 of file qxml.cpp.
|
private |
Parse a AttlistDecl [52].
Precondition: the beginning '<!' is already read and the head stands on the 'A' of '<!ATTLIST'
Definition at line 3880 of file qxml.cpp.
|
private |
Parse a Attribute [41].
Precondition: the head stands on the first character of the name of the attribute (i.e. all whitespaces are already parsed).
The head stand on the next character after the end quotes. The variable name contains the name of the attribute and the variable string contains the value of the attribute.
Definition at line 5402 of file qxml.cpp.
|
private |
Parse a AttType [54]
Definition at line 4080 of file qxml.cpp.
|
private |
Parse a AttValue [10]
Precondition: the head stands on the beginning " or '
If this function was successful, the head stands on the first character after the closing " or ' and the value of the attribute is in string().
Definition at line 4330 of file qxml.cpp.
|
private |
|
private |
|
private |
Parse a content [43].
A content is only used between tags. If a end tag is found the < is already read and the head stand on the '/' of the end tag '</name>'.
Definition at line 2635 of file qxml.cpp.
|
private |
Parse a document type definition (doctypedecl [28]).
Precondition: the beginning '<!' of the doctype is already read the head stands on the 'D' of '<!DOCTYPE'.
If this funktion was successful, the head-position is on the first character after the document type definition.
Definition at line 3264 of file qxml.cpp.
|
private |
Parse an element [39].
Precondition: the opening '<' is already read.
Definition at line 2303 of file qxml.cpp.
|
private |
Helper to break down the size of the code in the case statement. Return FALSE on error, otherwise TRUE.
Definition at line 2589 of file qxml.cpp.
|
private |
Helper to break down the size of the code in the case statement. Return FALSE on error, otherwise TRUE.
Definition at line 2482 of file qxml.cpp.
Helper to break down the size of the code in the case statement. Return FALSE on error, otherwise TRUE.
Definition at line 2539 of file qxml.cpp.
|
private |
Parse a EntityDecl [70].
Precondition: the beginning '<!E' is already read and the head stand on the 'N' of '<!ENTITY'
Definition at line 4908 of file qxml.cpp.
|
private |
Parse a EntityValue [9]
Definition at line 5171 of file qxml.cpp.
|
private |
|
private |
Parse a Name [5] and store the name in name or ref (if useRef is TRUE).
Definition at line 5498 of file qxml.cpp.
|
private |
|
private |
Parse a NotationDecl [82].
Precondition: the beginning '<!' is already read and the head stands on the 'N' of '<!NOTATION'
Definition at line 4661 of file qxml.cpp.
|
private |
Parse a PEReference [69]
Definition at line 3776 of file qxml.cpp.
Parse a processing instruction [16].
If xmldec is TRUE, it tries to parse a PI or a XML declaration [23].
Precondition: the beginning '<' of the PI is already read and the head stand on the '?' of '<?'.
If this funktion was successful, the head-position is on the first character after the PI.
Definition at line 3042 of file qxml.cpp.
|
private |
Parses the prolog [22].
Definition at line 2131 of file qxml.cpp.
|
private |
Parse a Reference [67].
charDataRead is set to TRUE if the reference must not be parsed. The character(s) which the reference mapped to are appended to string. The head stands on the first character after the reference.
charDataRead is set to FALSE if the reference must be parsed. The charachter(s) which the reference mapped to are inserted at the reference position. The head stands on the first character of the replacement).
Definition at line 5658 of file qxml.cpp.
|
private |
Helper function for parseReference()
Definition at line 5805 of file qxml.cpp.
Returns 0 since this class does not support any properties.
Implements QXmlReader.
Definition at line 2004 of file qxml.cpp.
|
inlineprivate |
Definition at line 598 of file qxml.h.
|
inlineprivate |
Definition at line 628 of file qxml.h.
|
inlineprivate |
Definition at line 653 of file qxml.h.
|
private |
Definition at line 6055 of file qxml.cpp.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Sets the state of a feature.
Supported features are:
Implements QXmlReader.
Definition at line 1972 of file qxml.cpp.
|
virtual |
|
virtual |
Does nothing since this class does not support any properties.
Implements QXmlReader.
|
inlineprivate |
Definition at line 586 of file qxml.h.
|
inlineprivate |
Definition at line 612 of file qxml.h.
|
inlineprivate |
Definition at line 637 of file qxml.h.
|
friend |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |