Interface Text

  • All Superinterfaces:
    java.lang.Cloneable, Node
    All Known Implementing Classes:
    TextNode

    public interface Text
    extends Node
    This interface represents a piece of the content of the HTML document.
    • Method Detail

      • getText

        java.lang.String getText()
        Accesses the textual contents of the node.
        Specified by:
        getText in interface Node
        Returns:
        The text of the node.
        See Also:
        setText(java.lang.String)
      • setText

        void setText​(java.lang.String text)
        Sets the contents of the node.
        Specified by:
        setText in interface Node
        Parameters:
        text - The new text for the node.
        See Also:
        getText()