QDomCharacterData#
The QDomCharacterData
class represents a generic string in the DOM. More…
Inherited by: QDomText, QDomComment, QDomCDATASection
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)
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description#
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()
.
See also
- class PySide6.QtXml.QDomCharacterData#
PySide6.QtXml.QDomCharacterData(x)
- Parameters:
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()
.
- PySide6.QtXml.QDomCharacterData.appendData(arg)#
- Parameters:
arg – str
Appends the string arg
to the stored string.
- PySide6.QtXml.QDomCharacterData.data()#
- Return type:
str
Returns the string stored in this object.
If the node is a null node
, it will return an empty string.
See also
- PySide6.QtXml.QDomCharacterData.deleteData(offset, count)#
- Parameters:
offset – int
count – int
Deletes a substring of length count
from position offset
.
- PySide6.QtXml.QDomCharacterData.insertData(offset, arg)#
- Parameters:
offset – int
arg – str
Inserts the string arg
into the stored string at position offset
.
- PySide6.QtXml.QDomCharacterData.length()#
- Return type:
int
Returns the length of the stored string.
- PySide6.QtXml.QDomCharacterData.replaceData(offset, count, arg)#
- Parameters:
offset – int
count – int
arg – str
Replaces the substring of length count
starting at position offset
with the string arg
.
- PySide6.QtXml.QDomCharacterData.setData(arg__1)#
- Parameters:
arg__1 – str
Sets this object’s string to v
.
See also
- PySide6.QtXml.QDomCharacterData.substringData(offset, count)#
- Parameters:
offset – int
count – int
- Return type:
str
Returns the substring of length count
from position offset
.