Package org.eclipse.lemminx.dom

## Class DOMCharacterData

- java.lang.Object
- - org.eclipse.lemminx.dom.DOMNode
  - - org.eclipse.lemminx.dom.DOMCharacterData

All Implemented Interfaces:
  `DOMRange`, `CharacterData`, `Node`

Direct Known Subclasses:
  `DOMComment`, `DOMProcessingInstruction`, `DOMText`

    public abstract class DOMCharacterData
    extends DOMNode
    implements CharacterData

A CharacterData node.

### Field Summary

### Fields inherited from class org.eclipse.lemminx.dom.DOMNode

`DTD_ATT_LIST_NODE, DTD_DECL_NODE, DTD_ELEMENT_DECL_NODE, DTD_ENTITY_DECL_NODE, DTD_NOTATION_DECL, NULL_VALUE`

### 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

Constructors
`DOMCharacterData​(int start, int end)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `appendData​(String data)`
`void` `deleteData​(int offset, int count)`
`boolean` `endsWithNewLine()` If data ends with a new line character.
`String` `getData()`
`String` `getDelimiter()`
`int` `getEndContent()`
`int` `getLength()`
`String` `getNodeValue()`
`String` `getNormalizedData()`
`int` `getStartContent()`
`boolean` `hasData()`
`boolean` `hasMultiLine()`
`boolean` `hasSiblings()` Returns true if this node has sibling nodes.
`void` `insertData​(int offset, String data)`
`boolean` `isWhitespace()`
`void` `replaceData​(int offset, int count, String data)`
`void` `setData​(String value)`
`void` `setWhitespace​(boolean isWhitespace)` Set true if this node's data is all whitespace
`boolean` `startsWithNewLine()` If data ends with a new line character.
`String` `substringData​(int offset, int count)`

### Methods inherited from class org.eclipse.lemminx.dom.DOMNode

`addChild, appendChild, cloneNode, compareDocumentPosition, findAttrAt, findAttrAt, findDTDDeclParameterAt, findDTDDeclParameterAt, findNodeAt, findNodeBefore, findNodeOrAttrAt, findTextAt, getAttribute, getAttributeAtIndex, getAttributeNode, getAttributeNode, getAttributeNodes, getAttributes, getBaseURI, getChild, getChildNodes, getChildren, getChildrenWithAttributeValue, getEnd, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getOrphanEndElement, getOrphanEndElement, getOwnerDocument, getParentElement, getParentNode, getPrefix, getPreviousNonTextSibling, getPreviousSibling, getStart, getTextContent, getUserData, hasAttribute, hasAttributes, hasChildNodes, insertBefore, isAttribute, isCDATA, isCharacterData, isChildOfOwnerDocument, isClosed, isComment, isDefaultNamespace, isDoctype, isDTDAttListDecl, isDTDElementDecl, isDTDEntityDecl, isDTDNotationDecl, isElement, isEqualNode, isGenericDTDDecl, isIncluded, isIncluded, isOwnerDocument, isProcessingInstruction, isProlog, isSameNode, isSupported, isText, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setAttribute, setAttributeNode, setNodeValue, setPrefix, setTextContent, setUserData, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.w3c.dom.Node

`appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData`

### Constructor Detail

#### DOMCharacterData

    public DOMCharacterData​(int start,
                            int end)

### Method Detail

#### hasMultiLine

    public boolean hasMultiLine()

#### getDelimiter

    public String getDelimiter()

#### endsWithNewLine

    public boolean endsWithNewLine()

If data ends with a new line character. Returns false if a character is found before a new line. Non-newline whitespace will be ignored while searching. If no data exists, returns false.

Returns:
  true if newline character ocurrs before non-whitespace character

#### startsWithNewLine

    public boolean startsWithNewLine()

If data ends with a new line character. Returns false if a character is found before a new line. Non-newline whitespace will be ignored while searching.

Returns:
  true if newline character ocurrs before non-whitespace character

#### getNormalizedData

    public String getNormalizedData()

#### hasData

    public boolean hasData()

#### hasSiblings

    public boolean hasSiblings()

Returns true if this node has sibling nodes.

#### getStartContent

    public int getStartContent()

#### getEndContent

    public int getEndContent()

#### getData

    public String getData()

Specified by:
  `getData` in interface `CharacterData`

#### getNodeValue

    public String getNodeValue()
                        throws DOMException

Specified by:
  `getNodeValue` in interface `Node`
Overrides:
  `getNodeValue` in class `DOMNode`
Throws:
  `DOMException`

#### isWhitespace

    public boolean isWhitespace()

Returns:
  the isWhitespace

#### setWhitespace

    public void setWhitespace​(boolean isWhitespace)

Set true if this node's data is all whitespace

Parameters:
  `isWhitespace` -

#### appendData

    public void appendData​(String data)
                    throws DOMException

Specified by:
  `appendData` in interface `CharacterData`
Throws:
  `DOMException`

#### deleteData

    public void deleteData​(int offset,
                           int count)
                    throws DOMException

Specified by:
  `deleteData` in interface `CharacterData`
Throws:
  `DOMException`

#### getLength

    public int getLength()

Specified by:
  `getLength` in interface `CharacterData`

#### insertData

    public void insertData​(int offset,
                           String data)
                    throws DOMException

Specified by:
  `insertData` in interface `CharacterData`
Throws:
  `DOMException`

#### replaceData

    public void replaceData​(int offset,
                            int count,
                            String data)
                     throws DOMException

Specified by:
  `replaceData` in interface `CharacterData`
Throws:
  `DOMException`

#### setData

    public void setData​(String value)
                 throws DOMException

Specified by:
  `setData` in interface `CharacterData`
Throws:
  `DOMException`

#### substringData

    public String substringData​(int offset,
                                int count)
                         throws DOMException

Specified by:
  `substringData` in interface `CharacterData`
Throws:
  `DOMException`