
public interface CharacterData extends Node
CharacterData XML nodes. These can be
either Text, CDATASection or
Comment nodes.ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE| Modifier and Type | Method and Description |
|---|---|
void |
appendData(String appendedData)
This method appends
data to the data in this
CharacterData. |
void |
deleteData(int offset,
int count)
This method deletes data, starting at
offset, and deleting
count characters. |
String |
getData()
This method retrieves the data.
|
int |
getLength()
This method retrieves the length of the data.
|
void |
insertData(int offset,
String insertedData)
This method inserts data at the specified offset.
|
void |
replaceData(int offset,
int count,
String replacementData)
This method replaces the substring of data indicated by
offset
and count with replacementData. |
void |
setData(String data)
This method sets the data to
data. |
String |
substringData(int offset,
int count)
This method gets a substring of the character data.
|
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, normalize, removeChild, replaceChild, setNodeValuevoid appendData(String appendedData)
data to the data in this
CharacterData.appendedData - the data to be appended to the endvoid deleteData(int offset,
int count)
offset, and deleting
count characters.offset - how far from the beginning to start deletingcount - how many characters to deleteString getData()
CharacterDataint getLength()
CharacterDatavoid insertData(int offset,
String insertedData)
offset - how far from the beginning to start insertinginsertedData - the data to be insertedvoid replaceData(int offset,
int count,
String replacementData)
offset
and count with replacementData.offset - how far from the beginning to start the replacementreplacementData - the data that will replace the deleted datacount - how many characters to delete before inserting
replacementDatavoid setData(String data)
data.data - the new dataString substringData(int offset, int count)
offset - the place to start the substringcount - how many characters to returnCopyright © 2018. All rights reserved.