gnu.xml.dom

Class DomText

Implemented Interfaces:
CharacterData, Cloneable, Comparable, DocumentEvent, EventTarget, Node, NodeList, Text
Known Direct Subclasses:
DomCDATA

public class DomText
extends DomCharacterData
implements Text

"Text" implementation.

Fields inherited from 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

Constructor Summary

DomText(DomDocument owner, String value)
Constructs a text node associated with the specified document and holding the specified data.
DomText(DomDocument owner, char[] buf, int off, int len)

Method Summary

String
getNodeName()
DOM L1 Returns the string "#text".
String
getWholeText()
boolean
isElementContentWhitespace()
Text
replaceWholeText(String content)
Text
splitText(int offset)
DOM L1 Splits this text node in two parts at the offset, returning the new text node (the sibling with the second part).

Methods inherited from class gnu.xml.dom.DomCharacterData

appendData, deleteData, getBaseURI, getData, getLength, getNodeValue, insertData, replaceData, setData, setNodeValue, substringData

Methods inherited from class gnu.xml.dom.DomNode

addEventListener, appendChild, clone, cloneNode, compact, compareDocumentPosition, compareTo, createEvent, dispatchEvent, getAttributes, getBaseURI, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getFeature, getFirstChild, getLastChild, getLength, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isReadonly, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, makeReadonly, nameAndTypeEquals, normalize, removeChild, removeEventListener, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData, toString, trimToSize

Constructor Details

DomText

protected DomText(DomDocument owner,
                  String value)
Constructs a text node associated with the specified document and holding the specified data.

This constructor should only be invoked by a Document object as part of its createTextNode functionality, or through a subclass which is similarly used in a "Sub-DOM" style layer.


DomText

protected DomText(DomDocument owner,
                  char[] buf,
                  int off,
                  int len)

Method Details

getNodeName

public String getNodeName()
DOM L1 Returns the string "#text".
Specified by:
getNodeName in interface Node
Overrides:
getNodeName in interface DomNode


getWholeText

public String getWholeText()
Specified by:
getWholeText in interface Text


isElementContentWhitespace

public boolean isElementContentWhitespace()
Specified by:
isElementContentWhitespace in interface Text


replaceWholeText

public Text replaceWholeText(String content)
            throws DOMException
Specified by:
replaceWholeText in interface Text


splitText

public Text splitText(int offset)
DOM L1 Splits this text node in two parts at the offset, returning the new text node (the sibling with the second part).
Specified by:
splitText in interface Text