L'interface CharacterData permet de gérer des données textuelles. Toutes les méthodes déclarées dans cette interface servent à manipuler des chaînes de caractères.
L'interface CharacterData étend l'interface Node. Ainsi, les champs et méthodes de l'interface Node sont tous disponibles à partir d'un objet CharacterData.
| Champ |
|---|
| Description |
| Les champs hérités de l'interface org.w3c.dom.Node |
|
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
| Méthode |
|---|
| Description |
| void appendData(String chaine) |
| ajoute la chaîne de caractères spécifiée à la fin du contenu textuel. |
| void deleteData(int pos, int nb) |
| supprime une sous-chaîne de caractères délimitée par la position de début et le nombre de caractères à traiter. |
| String getData() |
| retourne le contenu textuel du noeud. |
| int getLength() |
| retourne la longueur du contenu textuel du noeud. |
| void insertData(int pos, String chaine) |
| insère une chaîne de caractères à la position spécifiée. |
| void replaceData(int pos, int nb, String chaine) |
| remplace la sous-chaîne de caractères délimitée par la position de début et le nombre de caractères à traiter, par la chaîne de caractères spécifiée. |
| void setData(String data) |
| fixe le contenu textuel du noeud. |
| String substringData(int offset, int count) |
| extrait sous-chaîne de caractères délimitée par la position de début et le nombre de caractères à récupérer. |
| Les méthodes héritées de l'interface org.w3c.dom.Node |
|
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |