com.novell.xml.dom
Class TextImpl
java.lang.Object
com.novell.xml.dom.NodeImpl
com.novell.xml.dom.CharacterDataImpl
com.novell.xml.dom.TextImpl
- All Implemented Interfaces:
- CharacterData, Cloneable, Comparable, Node, Text
- Direct Known Subclasses:
- CDATASectionImpl
- public class TextImpl
- extends CharacterDataImpl
- implements Text
Fields inherited from class com.novell.xml.dom.NodeImpl |
allowedChildren, baseURI, changeCount, document, documentOrderVal, expandedName, firstChild, lastChild, localName, namespaceURI, nextOrderVal, nextSibling, nodeName, nodeValue, parentNode, prefix, previousSibling, toStringSerializes, xmlnsPrefix, xmlPrefix, xpathBehavior |
Fields inherited from interface org.w3c.dom.Node |
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 |
Method Summary |
String |
getNodeName()
The name of this node, depending on its type; see the table above. |
short |
getNodeType()
A code representing the type of the underlying object, as defined above. |
Text |
splitText(int offset)
Breaks this Text node into two Text nodes at the specified
offset, keeping both in the tree as siblings. |
Methods inherited from class com.novell.xml.dom.NodeImpl |
appendChild, checkName, checkNameNS, cloneNode, compareTo, fetchNamespacesFromDecls, gateModify, getAttributes, getBaseURI, getChangeCount, getChildNodes, getColumnNumber, getDocumentOrder, getExpandedName, getFirstChild, getLastChild, getLineNumber, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, incChangeCount, insertBefore, isChildAllowed, isReadOnly, isSupported, normalize, purgeCachedExpandedNames, removeChild, replaceChild, setBaseURI, setColumnNumber, setDeepReadOnly, setDocumentOrder, setLineNumber, setNodeValue, setOwnerDocument, setPrefix, setReadOnly, setXPathBehavior, toString |
Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
TextImpl
protected TextImpl(DocumentImpl owner,
String value)
getNodeName
public String getNodeName()
- The name of this node, depending on its type; see the table above.
- Specified by:
getNodeName
in interface Node
- Overrides:
getNodeName
in class NodeImpl
getNodeType
public short getNodeType()
- A code representing the type of the underlying object, as defined above.
- Specified by:
getNodeType
in interface Node
- Specified by:
getNodeType
in class NodeImpl
splitText
public Text splitText(int offset)
throws DOMException
- Breaks this
Text
node into two Text nodes at the specified
offset, keeping both in the tree as siblings. This node then only
contains all the content up to the offset
point. And a new
Text
node, which is inserted as the next sibling of this
node, contains all the content at and after the offset
point.
- Specified by:
splitText
in interface Text
- Parameters:
offset
- The offset at which to split, starting from 0.
- Returns:
- The new
Text
node.
- Throws:
DOMException
- INDEX_SIZE_ERR: Raised if the specified offset is negative or greater
than the number of characters in data
.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.