Interface CharacterData

All Superinterfaces:
All Known Subinterfaces:
CDATASection, Comment, Text

public interface CharacterData extends Node
This interface describes CharacterData XML nodes. These can be either Text, CDATASection or Comment nodes.
  • Method Details

    • appendData

      void appendData(String appendedData)
      This method appends data to the data in this CharacterData.
      appendedData - the data to be appended to the end
    • deleteData

      void deleteData(int offset, int count)
      This method deletes data, starting at offset, and deleting count characters.
      offset - how far from the beginning to start deleting
      count - how many characters to delete
    • getData

      String getData()
      This method retrieves the data.
      the data of this CharacterData
    • getLength

      int getLength()
      This method retrieves the length of the data.
      the length of the data contained in this CharacterData
    • insertData

      void insertData(int offset, String insertedData)
      This method inserts data at the specified offset.
      offset - how far from the beginning to start inserting
      insertedData - the data to be inserted
    • replaceData

      void replaceData(int offset, int count, String replacementData)
      This method replaces the substring of data indicated by offset and count with replacementData.
      offset - how far from the beginning to start the replacement
      replacementData - the data that will replace the deleted data
      count - how many characters to delete before inserting replacementData
    • setData

      void setData(String data)
      This method sets the data to data.
      data - the new data
    • substringData

      String substringData(int offset, int count)
      This method gets a substring of the character data.
      offset - the place to start the substring
      count - how many characters to return
      the specified substring