Package org.apache.harmony.xml.dom
Class CDATASectionImpl
java.lang.Object
org.apache.harmony.xml.dom.NodeImpl
org.apache.harmony.xml.dom.LeafNodeImpl
org.apache.harmony.xml.dom.CharacterDataImpl
org.apache.harmony.xml.dom.TextImpl
org.apache.harmony.xml.dom.CDATASectionImpl
- All Implemented Interfaces:
CDATASection,CharacterData,Node,Text
public final class CDATASectionImpl extends TextImpl implements CDATASection
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.
-
Field Summary
Fields inherited from class org.apache.harmony.xml.dom.CharacterDataImpl
bufferFields 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 Constructor Description CDATASectionImpl(DocumentImpl document, String data) -
Method Summary
Modifier and Type Method Description StringgetNodeName()The name of this node, depending on its type; see the table above.shortgetNodeType()A code representing the type of the underlying object, as defined above.booleanneedsSplitting()Returns true if this CDATA section contains the illegal character sequence "]]>".TextImplreplaceWithText()Replaces this node with a semantically equivalent text node.voidsplit()Splits this CDATA node into parts that do not contain a "]]>" sequence.Methods inherited from class org.apache.harmony.xml.dom.TextImpl
getWholeText, isElementContentWhitespace, minimize, replaceWholeText, splitTextMethods inherited from class org.apache.harmony.xml.dom.CharacterDataImpl
appendData, appendDataTo, deleteData, getData, getLength, getNodeValue, insertData, replaceData, setData, substringDataMethods inherited from class org.apache.harmony.xml.dom.LeafNodeImpl
getNextSibling, getParentNode, getPreviousSiblingMethods inherited from class org.apache.harmony.xml.dom.NodeImpl
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getOwnerDocument, getPrefix, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserDataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.w3c.dom.CharacterData
appendData, deleteData, getData, getLength, insertData, replaceData, setData, substringDataMethods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserDataMethods inherited from interface org.w3c.dom.Text
getWholeText, isElementContentWhitespace, replaceWholeText, splitText
-
Constructor Details
-
CDATASectionImpl
-
-
Method Details
-
getNodeName
Description copied from interface:NodeThe name of this node, depending on its type; see the table above.- Specified by:
getNodeNamein interfaceNode- Overrides:
getNodeNamein classTextImpl
-
getNodeType
public short getNodeType()Description copied from interface:NodeA code representing the type of the underlying object, as defined above.- Specified by:
getNodeTypein interfaceNode- Overrides:
getNodeTypein classTextImpl
-
split
public void split()Splits this CDATA node into parts that do not contain a "]]>" sequence. Any newly created nodes will be inserted before this node. -
needsSplitting
public boolean needsSplitting()Returns true if this CDATA section contains the illegal character sequence "]]>". Such nodes must besplit()before they are serialized. -
replaceWithText
Replaces this node with a semantically equivalent text node. This node will be removed from the DOM tree and the new node inserted in its place.- Returns:
- the replacement node.
-