Table Of Contents

Previous topic

QDomAttr

Next topic

QDomComment

QDomCharacterData

Inheritance diagram of QDomCharacterData

Inherited by: QDomComment, QDomText, QDomCDATASection

Synopsis

Functions

Detailed Description

The 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() .

class PySide.QtXml.QDomCharacterData
class PySide.QtXml.QDomCharacterData(x)
Parameters:xPySide.QtXml.QDomCharacterData

Constructs an empty character data object.

Constructs a copy of 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 PySide.QtXml.QDomNode.cloneNode() .

PySide.QtXml.QDomCharacterData.appendData(arg)
Parameters:arg – unicode

Appends the string arg to the stored string.

PySide.QtXml.QDomCharacterData.data()
Return type:unicode

Returns the string stored in this object.

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

PySide.QtXml.QDomCharacterData.deleteData(offset, count)
Parameters:
  • offset – long
  • count – long

Deletes a substring of length count from position offset .

PySide.QtXml.QDomCharacterData.insertData(offset, arg)
Parameters:
  • offset – long
  • arg – unicode

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

PySide.QtXml.QDomCharacterData.length()
Return type:PySide.QtCore.uint

Returns the length of the stored string.

PySide.QtXml.QDomCharacterData.replaceData(offset, count, arg)
Parameters:
  • offset – long
  • count – long
  • arg – unicode

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

PySide.QtXml.QDomCharacterData.setData(arg__1)
Parameters:arg__1 – unicode

Sets this object’s string to v .

PySide.QtXml.QDomCharacterData.substringData(offset, count)
Parameters:
  • offset – long
  • count – long
Return type:

unicode

Returns the substring of length count from position offset .