QDomCharacterData¶
The
QDomCharacterData
class represents a generic string in the DOM. More…

Inherited by: QDomCDATASection, QDomComment, QDomText
Synopsis¶
Functions¶
def
appendData
(arg)def
data
()def
deleteData
(offset, count)def
insertData
(offset, arg)def
length
()def
replaceData
(offset, count, arg)def
setData
(arg__1)def
substringData
(offset, count)
Detailed Description¶
Character data as used in XML specifies a generic data string. More specialized versions of this class are
QDomText
,QDomComment
andQDomCDATASection
.The data string is set with
setData()
and retrieved withdata()
. You can retrieve a portion of the data string usingsubstringData()
. Extra data can be appended withappendData()
, or inserted withinsertData()
. Portions of the data string can be deleted withdeleteData()
or replaced withreplaceData()
. The length of the data string is returned bylength()
.The node type of the node containing this character data is returned by
nodeType()
.See also
-
class
QDomCharacterData
¶ QDomCharacterData(x)
- param x
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
cloneNode()
.
-
PySide2.QtXml.QDomCharacterData.
appendData
(arg)¶ - Parameters
arg – unicode
Appends the string
arg
to the stored string.
-
PySide2.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.See also
-
PySide2.QtXml.QDomCharacterData.
deleteData
(offset, count)¶ - Parameters
offset – long
count – long
Deletes a substring of length
count
from positionoffset
.
-
PySide2.QtXml.QDomCharacterData.
insertData
(offset, arg)¶ - Parameters
offset – long
arg – unicode
Inserts the string
arg
into the stored string at positionoffset
.
-
PySide2.QtXml.QDomCharacterData.
length
()¶ - Return type
int
Returns the length of the stored string.
-
PySide2.QtXml.QDomCharacterData.
replaceData
(offset, count, arg)¶ - Parameters
offset – long
count – long
arg – unicode
Replaces the substring of length
count
starting at positionoffset
with the stringarg
.
-
PySide2.QtXml.QDomCharacterData.
setData
(arg__1)¶ - Parameters
arg__1 – unicode
Sets this object’s string to
v
.See also
-
PySide2.QtXml.QDomCharacterData.
substringData
(offset, count)¶ - Parameters
offset – long
count – long
- Return type
unicode
Returns the substring of length
count
from positionoffset
.