Class DomCDataSection

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, org.w3c.dom.CDATASection, org.w3c.dom.CharacterData, org.w3c.dom.Node, org.w3c.dom.Text

    public class DomCDataSection
    extends DomText
    implements org.w3c.dom.CDATASection
    Representation of a CDATA node in the HTML DOM.
    See Also:
    Serialized Form
    • Constructor Detail

      • DomCDataSection

        public DomCDataSection​(SgmlPage page,
                               java.lang.String data)
        Creates a new instance.
        Parameters:
        page - the Page that contains this element
        data - the string data held by this node
    • Method Detail

      • getNodeType

        public short getNodeType()
        Specified by:
        getNodeType in interface org.w3c.dom.Node
        Overrides:
        getNodeType in class DomText
        Returns:
        the node type constant, in this case Node.CDATA_SECTION_NODE
      • getNodeName

        public java.lang.String getNodeName()
        Specified by:
        getNodeName in interface org.w3c.dom.Node
        Overrides:
        getNodeName in class DomText
        Returns:
        the node name, in this case DomText.NODE_NAME
      • printXml

        protected void printXml​(java.lang.String indent,
                                java.io.PrintWriter printWriter)
        Recursively writes the XML data for the node tree starting at node.
        Overrides:
        printXml in class DomText
        Parameters:
        indent - white space to indent child nodes
        printWriter - writer where child nodes are written
      • createSplitTextNode

        protected DomText createSplitTextNode​(int offset)
        Creates a new text node split from another text node. This method allows the derived type of the new text node to match the original node type.
        Overrides:
        createSplitTextNode in class DomText
        Parameters:
        offset - the character position at which to split the DomText node
        Returns:
        the newly created Text node