Class 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.

  • Constructor Details

  • Method Details

    • getNodeName

      public String getNodeName()
      Description copied from interface: Node
      The name of this node, depending on its type; see the table above.
      Specified by:
      getNodeName in interface Node
      Overrides:
      getNodeName in class TextImpl
    • getNodeType

      public short getNodeType()
      Description copied from interface: Node
      A code representing the type of the underlying object, as defined above.
      Specified by:
      getNodeType in interface Node
      Overrides:
      getNodeType in class TextImpl
    • 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 be split() before they are serialized.
    • replaceWithText

      public TextImpl 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.