QDomText Class Reference

[ QtXml module]

The QDomText class represents text data in the parsed XML 文档。 更多...

继承 QDomCharacterData .

Inherited by QDomCDATASection .

方法


详细描述

The QDomText class represents text data in the parsed XML 文档。

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

有关文档对象模型的进一步信息,见 级别 1 and 级别 2 核心 . For a more general introduction of the DOM implementation see the QDomDocument 文档编制。


方法文档编制

QDomText.__init__ ( self )

构造空 QDomText 对象。

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

QDomText.__init__ ( self , QDomText   x )

构造副本为 x .

The data of the copy is shared (shallow copy): modifying one node will also change the other. If you want to make a deep copy, use cloneNode ().

QDomNode.NodeType QDomText.nodeType ( self )

返回 TextNode .

QDomText QDomText.splitText ( self , 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 ().