继承者: QDomComment , QDomText , QDomCDATASection
PySide.QtXml.QDomCharacterData class represents a generic string in the DOM.
Character data as used in XML specifies a generic data string. More specialized versions of this class are PySide.QtXml.QDomText , PySide.QtXml.QDomComment and PySide.QtXml.QDomCDATASection .
The data string is set with PySide.QtXml.QDomCharacterData.setData() and retrieved with PySide.QtXml.QDomCharacterData.data() . You can retrieve a portion of the data string using PySide.QtXml.QDomCharacterData.substringData() . Extra data can be appended with PySide.QtXml.QDomCharacterData.appendData() , or inserted with PySide.QtXml.QDomCharacterData.insertData() . Portions of the data string can be deleted with PySide.QtXml.QDomCharacterData.deleteData() or replaced with PySide.QtXml.QDomCharacterData.replaceData() . The length of the data string is returned by PySide.QtXml.QDomCharacterData.length() .
The node type of the node containing this character data is returned by PySide.QtXml.QDomCharacterData.nodeType() .
| 参数: | x – PySide.QtXml.QDomCharacterData |
|---|
Constructs an empty character data object.
构造副本为 x .
拷贝数据是共享的 (浅拷贝):修改一个节点也将改变另一节点。若想要制作深度副本,使用 PySide.QtXml.QDomNode.cloneNode() .
| 参数: | arg – unicode |
|---|
追加字符串 arg to the stored string.
| 返回类型: | unicode |
|---|
Returns the string stored in this object.
If the node is a null node , it will return an empty string.
| 参数: |
|
|---|
Deletes a substring of length count from position offset .
| 参数: |
|
|---|
Inserts the string arg into the stored string at position offset .
| 返回类型: | PySide.QtCore.uint |
|---|
Returns the length of the stored string.
| 参数: |
|
|---|
Replaces the substring of length count starting at position offset with the string arg .
| 参数: | arg__1 – unicode |
|---|
Sets this object's string to v .
| 参数: |
|
|---|---|
| 返回类型: |
unicode |
Returns the substring of length count from position offset .