• PySide 模块
  • PySide.QtXml
  • 内容表表

    上一话题

    QDomAttr

    下一话题

    QDomComment

    QDomCharacterData

    继承者: 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() .

    class PySide.QtXml. QDomCharacterData
    class PySide.QtXml. QDomCharacterData ( x )
    参数: x PySide.QtXml.QDomCharacterData

    Constructs an empty character data object.

    构造副本为 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 )
    参数: arg – unicode

    Appends the string arg to the stored string.

    PySide.QtXml.QDomCharacterData. data ( )
    返回类型: 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 )
    参数:
    • offset – long
    • count – long

    Deletes a substring of length count from position offset .

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

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

    PySide.QtXml.QDomCharacterData. length ( )
    返回类型: PySide.QtCore.uint

    Returns the length of the stored string.

    PySide.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 .

    PySide.QtXml.QDomCharacterData. setData ( arg__1 )
    参数: arg__1 – unicode

    Sets this object's string to v .

    PySide.QtXml.QDomCharacterData. substringData ( offset , count )
    参数:
    • offset – long
    • count – long
    返回类型:

    unicode

    Returns the substring of length count from position offset .