TextImpl.javaAPI DocAndroid 1.5 API2076Wed May 06 22:41:06 BST 2009org.apache.harmony.xml.dom


public class TextImpl extends CharacterDataImpl implements Text
Provides a straightforward implementation of the corresponding W3C DOM interface. The class is used internally only, thus only notable members that are not in the original interface are documented (the W3C docs are quite extensive). Hope that's ok.

Some of the fields may have package visibility, so other classes belonging to the DOM implementation can easily access them while maintaining the DOM tree structure.

Fields Summary
Constructors Summary
TextImpl(DocumentImpl document, String data)

        super(document, data);
Methods Summary
public java.lang.StringgetNodeName()

        return "#text";
public shortgetNodeType()

        return Node.TEXT_NODE;
public java.lang.StringgetNodeValue()

        return getData();
public org.w3c.dom.TextsplitText(int offset)

        Text newText = getOwnerDocument().createTextNode(
                substringData(offset, getLength() - offset));
        deleteData(0, offset);

        Node refNode = getNextSibling();
        if (refNode == null) {
        } else {
            getParentNode().insertBefore(newText, refNode);

        return this;