内容表

上一话题

QDomCDATASection

下一话题

QDomComment

QDomCharacterData

QDomCharacterData class represents a generic string in the DOM. 更多

Inheritance diagram of PySide2.QtXml.QDomCharacterData

继承者: QDomCDATASection , QDomComment , QDomText

概要

函数

详细描述

Character data as used in XML specifies a generic data string. More specialized versions of this class are QDomText , QDomComment and QDomCDATASection .

The data string is set with setData() and retrieved with data() . You can retrieve a portion of the data string using substringData() . Extra data can be appended with appendData() , or inserted with insertData() . Portions of the data string can be deleted with deleteData() or replaced with replaceData() . The length of the data string is returned by length() .

The node type of the node containing this character data is returned by nodeType() .

class QDomCharacterData

QDomCharacterData(x)

param x

QDomCharacterData

Constructs an empty character data object.

PySide2.QtXml.QDomCharacterData. appendData ( arg )
参数

arg – unicode

追加字符串 arg to the stored string.

PySide2.QtXml.QDomCharacterData. data ( )
返回类型

unicode

Returns the string stored in this object.

If the node is a null node , it will return an empty string.

另请参阅

setData()

PySide2.QtXml.QDomCharacterData. deleteData ( offset , count )
参数
  • offset – long

  • count – long

Deletes a substring of length count from position offset .

PySide2.QtXml.QDomCharacterData. insertData ( offset , arg )
参数
  • offset – long

  • arg – unicode

Inserts the string arg into the stored string at position offset .

PySide2.QtXml.QDomCharacterData. length ( )
返回类型

int

Returns the length of the stored string.

PySide2.QtXml.QDomCharacterData. replaceData ( offset , count , arg )
参数
  • offset – long

  • count – long

  • arg – unicode

Replaces the substring of length count starting at position offset with the string arg .

PySide2.QtXml.QDomCharacterData. setData ( arg__1 )
参数

arg__1 – unicode

Sets this object’s string to v .

另请参阅

data()

PySide2.QtXml.QDomCharacterData. substringData ( offset , count )
参数
  • offset – long

  • count – long

返回类型

unicode

Returns the substring of length count from position offset .