QDomCharacterDataclass represents a generic string in the DOM. 更多 …
继承者: QDomCDATASection , QDomComment , QDomText
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)
Character data as used in XML specifies a generic data string. More specialized versions of this class are
QDomText,QDomCommentandQDomCDATASection.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().
QDomCharacterData
¶
QDomCharacterData(x)
- param x
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.
另请参阅
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
.
另请参阅
PySide2.QtXml.QDomCharacterData.
substringData
(
offset
,
count
)
¶
offset – long
count – long
unicode
Returns the substring of length
count
from position
offset
.