QDomText 类

QDomText class represents text data in the parsed XML document. 更多...

头: #include <QDomText>
qmake: QT += xml
继承: QDomCharacterData
继承者:

QDomCDATASection

注意: 此类的所有函数 可重入 .

公共函数

QDomText ()
QDomText (const QDomText & x )
QDomNode::NodeType nodeType () const
QDomText splitText (int offset )
QDomText & operator= (const QDomText & x )

详细描述

QDomText class represents text data in the parsed XML document.

You can split the text in a QDomText object over two QDomText objecs with splitText ().

有关文档对象模型的进一步信息,见 级别 1 and 级别 2 核心 。有关 DOM 实现的更一般介绍,见 QDomDocument 文档编制。

成员函数文档编制

QDomText:: QDomText ()

构造空的 QDomText 对象。

为构建 QDomText with content, use QDomDocument::createTextNode ().

QDomText:: QDomText (const QDomText & x )

构造副本为 x .

拷贝数据是共享的 (浅拷贝):修改一个节点也将改变另一节点。若想要制作深度副本,使用 cloneNode ().

QDomNode::NodeType QDomText:: nodeType () const

返回 TextNode .

QDomText QDomText:: splitText ( int offset )

Splits this DOM text object into two QDomText objects. This object keeps its first offset characters and the second (newly created) object is inserted into the document tree after this object with the remaining characters.

The function returns the newly created object.

另请参阅 QDomNode::normalize ().

QDomText &QDomText:: operator= (const QDomText & x )

赋值 x to this DOM text.

拷贝数据是共享的 (浅拷贝):修改一个节点也将改变另一节点。若想要制作深度副本,使用 cloneNode ().