Class TextNode


  • @JsType(isNative=true,
            name="Text",
            namespace="<global>")
    public final class TextNode
    extends BaseNode
    Represents the textual content of an element or attribute.
    If an element has no markup within its content, it has a single child implementing text node that contains the element's text. However, if the element contains markup, it is parsed in the information items and text nodes that form its children.
    Author:
    Andrea "Stock" Stocchero
    • Method Detail

      • getData

        @JsProperty
        public String getData()
        Returns the textual data contained in this object.
        Returns:
        the textual data contained in this object
      • setData

        @JsProperty
        public void setData​(String data)
        Sets the textual data contained in this object.
        Parameters:
        data - the textual data contained in this object
      • length

        @JsProperty(name="length")
        public int length()
        Returns the value representing the size of the string contained in data.
        Returns:
        the value representing the size of the string contained in data