public class

DataNode

extends Node
java.lang.Object
   ↳ org.jsoup.nodes.Node
     ↳ org.jsoup.nodes.DataNode

Class Overview

A data node, for contents of style, script tags etc, where contents should not show in text().

Summary

Public Constructors
DataNode(String data, String baseUri)
Create a new DataNode.
Public Methods
static DataNode createFromEncoded(String encodedData, String baseUri)
Create a new DataNode from HTML encoded data.
String getWholeData()
Get the data contents of this node.
String nodeName()
Get the node name of this node.
DataNode setWholeData(String data)
Set the data contents of this node.
String toString()
[Expand]
Inherited Methods
From class org.jsoup.nodes.Node
From class java.lang.Object

Public Constructors

public DataNode (String data, String baseUri)

Create a new DataNode.

Parameters
data data contents
baseUri base URI

Public Methods

public static DataNode createFromEncoded (String encodedData, String baseUri)

Create a new DataNode from HTML encoded data.

Parameters
encodedData encoded data
baseUri bass URI
Returns
  • new DataNode

public String getWholeData ()

Get the data contents of this node. Will be unescaped and with original new lines, space etc.

Returns
  • data

public String nodeName ()

Get the node name of this node. Use for debugging purposes and not logic switching (for that, use instanceof).

Returns
  • node name

public DataNode setWholeData (String data)

Set the data contents of this node.

Parameters
data unencoded data
Returns
  • this node, for chaining

public String toString ()