enum QXmlStreamReader::TokenType
This enum specifies the type of token the reader just read.
Constant | Value | Description | Example |
QXmlStreamReader::NoToken | 0 | The reader has not yet read anything. | |
QXmlStreamReader::Invalid | 1 | An error has occurred, reported in error() and errorString(). | |
QXmlStreamReader::StartDocument | 2 | The reader reports the XML version number in documentVersion(), and the encoding as specified in the XML document in documentEncoding(). If the document is declared standalone, isStandaloneDocument() returns true; otherwise it returns false. | |
QXmlStreamReader::EndDocument | 3 | The reader reports the end of the document. | |
QXmlStreamReader::StartElement | 4 | The reader reports the start of an element with namespaceUri() and name(). Empty elements are also reported as StartElement, followed directly by EndElement. The convenience function readElementText() can be called to concatenate all content until the corresponding EndElement. Attributes are reported in attributes(), namespace declarations in namespaceDeclarations(). | 表示整个开始结点,如: <translation type="unfinished">1操作成功</translation>返回</translation> 中的 <translation type="unfinished"> |
QXmlStreamReader::EndElement | 5 | The reader reports the end of an element with namespaceUri() and name(). | |
QXmlStreamReader::Characters | 6 | The reader reports characters in text(). If the characters are all white-space, isWhitespace() returns true. If the characters stem from a CDATA section, isCDATA() returns true. | 表示结点的内容,如: <translation>返回</translation> 中的 返回 |
QXmlStreamReader::Comment | 7 | The reader reports a comment in text(). | |
QXmlStreamReader::DTD | 8 | The reader reports a DTD in text(), notation declarations in notationDeclarations(), and entity declarations in entityDeclarations(). Details of the DTD declaration are reported in in dtdName(), dtdPublicId(), and dtdSystemId(). | <!DOCTYPE TS> |
QXmlStreamReader::EntityReference | 9 | The reader reports an entity reference that could not be resolved. The name of the reference is reported in name(), the replacement text in text(). | |
QXmlStreamReader::ProcessingInstruction | 10 | The reader reports a processing instruction in processingInstructionTarget() and processingInstructionData(). |
QXmlStreamAttributes
void | append(const QString &namespaceUri, const QString &name, const QString &value) |
void | append(const QString &qualifiedName, const QString &value) |
bool | hasAttribute(const QString &qualifiedName) const |
bool | hasAttribute(QLatin1String qualifiedName) const |
bool | hasAttribute(const QString &namespaceUri, const QString &name) const |
QStringRef | value(const QString &namespaceUri, const QString &name) const |
QStringRef | value(const QString &namespaceUri, QLatin1String name) const |
QStringRef | value(QLatin1String namespaceUri, QLatin1String name) const |
QStringRef | value(const QString &qualifiedName) const |
QStringRef | value(QLatin1String qualifiedName) const |
- 89 public functions inherited from QVector
Additional Inherited Members
- 2 static public members inherited from QVector