QXmlStreamReader


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

Public Functions

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值