com.aspose.html.dom

Class CharacterData

    • Constructor Detail

      • CharacterData

        public CharacterData(String data,
                             Document doc)

        Initializes a new instance of the CharacterData class.

        Parameters:
        data - The character data.
        doc - The document.
    • Method Detail

      • getLength

        @DOMNameAttribute(name="length")
        public int getLength()

        The number of 16-bit units that are available through data and the substringData method below. This may have the value zero, i.e., CharacterData nodes may be empty.

      • substringData

        @DOMNameAttribute(name="substringData")
        public String substringData(int offset,
                                                                             int count)

        Extracts a range of data from the node.

        Parameters:
        offset - The offset.
        count - The count.
        Returns:
        The text data
      • appendData

        @DOMNameAttribute(name="appendData")
        public void appendData(String arg)

        Append the string to the end of the character data of the node.

        Parameters:
        arg - The argument.
      • insertData

        @DOMNameAttribute(name="insertData")
        public void insertData(int offset,
                                                                     String arg)

        Insert a string at the specified 16-bit unit offset.

        Parameters:
        offset - The offset.
        arg - The argument.
      • deleteData

        @DOMNameAttribute(name="deleteData")
        public void deleteData(int offset,
                                                                     int count)

        Remove a range of 16-bit units from the node.

        Parameters:
        offset - The offset.
        count - The count.
      • replaceData

        @DOMNameAttribute(name="replaceData")
        public void replaceData(int offset,
                                                                       int count,
                                                                       String arg)

        Replace the characters starting at the specified 16-bit unit offset with the specified string.

        Parameters:
        offset - The offset.
        count - The count.
        arg - The argument.
      • toString

        public String toString()

        Returns a System.String that represents this instance.

        Overrides:
        toString in class Node
        Returns:
        A System.String that represents this instance.