Uses of Class
org.jsoup.nodes.Node
-
Packages that use Node Package Description org.jsoup.examples Contains example programs and use of jsoup.org.jsoup.helper Package containing classes supporting the core jsoup code.org.jsoup.nodes HTML document structure nodes.org.jsoup.parser Contains the HTML parser, tag specifications, and HTML tokeniser.org.jsoup.safety Contains the jsoup HTML cleaner, and safelist definitions.org.jsoup.select Packages to support the CSS-style element selector. -
-
Uses of Node in org.jsoup.examples
Methods in org.jsoup.examples with parameters of type Node Modifier and Type Method Description void
HtmlToPlainText.FormattingVisitor. head(Node node, int depth)
void
HtmlToPlainText.FormattingVisitor. tail(Node node, int depth)
-
Uses of Node in org.jsoup.helper
Methods in org.jsoup.helper with type parameters of type Node Modifier and Type Method Description <T extends Node>
java.util.List<T>W3CDom. sourceNodes(org.w3c.dom.NodeList nodeList, java.lang.Class<T> nodeType)
Retrieves the original jsoup DOM nodes from a nodelist created by this convertor.Methods in org.jsoup.helper with parameters of type Node Modifier and Type Method Description private void
W3CDom.W3CBuilder. append(org.w3c.dom.Node append, Node source)
private void
W3CDom.W3CBuilder. copyAttributes(Node source, org.w3c.dom.Element el)
void
W3CDom.W3CBuilder. head(Node source, int depth)
void
W3CDom.W3CBuilder. tail(Node source, int depth)
-
Uses of Node in org.jsoup.nodes
Classes in org.jsoup.nodes with type parameters of type Node Modifier and Type Class Description class
NodeIterator<T extends Node>
Iterate through a Node and its tree of descendants, in document order, and returns nodes of the specified type.Subclasses of Node in org.jsoup.nodes Modifier and Type Class Description class
CDataNode
A Character Data node, to support CDATA sections.class
Comment
A comment node.class
DataNode
A data node, for contents of style, script tags etc, where contents should not show in text().class
Document
A HTML Document.class
DocumentType
A<!DOCTYPE>
node.class
Element
An HTML Element consists of a tag name, attributes, and child nodes (including text nodes and other elements).class
FormElement
A HTML Form Element provides ready access to the form fields/controls that are associated with it.class
LeafNode
A node that does not hold any children.class
PseudoTextElement
class
TextNode
A text node.class
XmlDeclaration
An XML Declaration.Fields in org.jsoup.nodes declared as Node Modifier and Type Field Description private Node
NodeIterator. current
private Node
NodeIterator. currentParent
private T
NodeIterator. next
(package private) Node
Node. parentNode
private Node
NodeIterator. previous
private Node
NodeIterator. root
Fields in org.jsoup.nodes with type parameters of type Node Modifier and Type Field Description (package private) java.util.List<Node>
Element. childNodes
(package private) static java.util.List<Node>
Node. EmptyNodes
Methods in org.jsoup.nodes with type parameters of type Node Modifier and Type Method Description <T extends Node>
java.util.stream.Stream<T>Node. nodeStream(java.lang.Class<T> type)
Returns a Stream of this and descendant nodes, containing only nodes of the specified type.<T extends Node>
java.util.List<T>Element. selectXpath(java.lang.String xpath, java.lang.Class<T> nodeType)
Find Nodes that match the supplied XPath expression.(package private) static <T extends Node>
java.util.List<T>NodeUtils. selectXpath(java.lang.String xpath, Element el, java.lang.Class<T> nodeType)
This impl works by compiling the input xpath expression, and then evaluating it against a W3C Document converted from the original jsoup element.(package private) static <T extends Node>
java.util.Spliterator<T>NodeUtils. spliterator(java.util.Iterator<T> iterator)
(package private) static <T extends Node>
java.util.stream.Stream<T>NodeUtils. stream(Node start, java.lang.Class<T> type)
Creates a Stream, starting with the supplied node.Methods in org.jsoup.nodes that return Node Modifier and Type Method Description Node
Node. after(java.lang.String html)
Insert the specified HTML into the DOM after this node (as a following sibling).Node
Node. after(Node node)
Insert the specified node into the DOM after this node (as a following sibling).Node
LeafNode. attr(java.lang.String key, java.lang.String value)
Node
Node. attr(java.lang.String attributeKey, java.lang.String attributeValue)
Set an attribute (key=value).Node
Node. before(java.lang.String html)
Insert the specified HTML into the DOM before this node (as a preceding sibling).Node
Node. before(Node node)
Insert the specified node into the DOM before this node (as a preceding sibling).Node
Node. childNode(int index)
Get a child node by its 0-based index.protected Node[]
Node. childNodesAsArray()
Node
Node. clearAttributes()
Clear (remove) each of the attributes in this node.Node
Node. clone()
Create a stand-alone, deep copy of this node, and all of its children.protected Node
Node. doClone(Node parent)
Node
LeafNode. empty()
abstract Node
Node. empty()
Delete all this node's children.Node
Node. filter(NodeFilter nodeFilter)
Perform a depth-first filtered traversal through this node and its descendants.Node
Node. firstChild()
Gets the first child node of this node, ornull
if there is none.Node
Node. forEachNode(java.util.function.Consumer<? super Node> action)
Perform the supplied action on this Node and each of its descendants, during a depth-first traversal.Node
Node. lastChild()
Gets the last child node of this node, ornull
if there is none.Node
Node. nextSibling()
Get this node's next sibling.Node
Node. parent()
Gets this node's parent node.Node
Node. parentNode()
Gets this node's parent node.Node
Node. previousSibling()
Get this node's previous sibling.Node
LeafNode. removeAttr(java.lang.String key)
Node
Node. removeAttr(java.lang.String attributeKey)
Remove an attribute from this node.Node
Node. root()
Get this node's root node; that is, its topmost ancestor.Node
Node. shallowClone()
Create a stand-alone, shallow copy of this node.Node
Node. traverse(NodeVisitor nodeVisitor)
Perform a depth-first traversal through this node and its descendants.Node
Node. unwrap()
Removes this node from the DOM, and moves its children up into the node's parent.Node
Node. wrap(java.lang.String html)
Wrap the supplied HTML around this node.Methods in org.jsoup.nodes that return types with arguments of type Node Modifier and Type Method Description java.util.List<Node>
Node. childNodes()
Get this node's children.java.util.List<Node>
Node. childNodesCopy()
Returns a deep copy of this node's children.protected java.util.List<Node>
Element. ensureChildNodes()
protected java.util.List<Node>
LeafNode. ensureChildNodes()
protected abstract java.util.List<Node>
Node. ensureChildNodes()
static NodeIterator<Node>
NodeIterator. from(Node start)
Create a NoteIterator that will iterate the supplied node, and all of its descendants.java.util.stream.Stream<Node>
Node. nodeStream()
Returns a Stream of this Node and all of its descendant Nodes.java.util.List<Node>
Node. siblingNodes()
Retrieves this node's sibling nodes.Methods in org.jsoup.nodes with parameters of type Node Modifier and Type Method Description protected void
Node. addChildren(int index, Node... children)
protected void
Node. addChildren(Node... children)
Element
Element. after(Node node)
Insert the specified node into the DOM after this node (as a following sibling).Node
Node. after(Node node)
Insert the specified node into the DOM after this node (as a following sibling).Element
Element. appendChild(Node child)
Insert a node to the end of this Element's children.private static void
Element. appendWholeText(Node node, java.lang.StringBuilder accum)
Element
Element. before(Node node)
Insert the specified node into the DOM before this node (as a preceding sibling).Node
Node. before(Node node)
Insert the specified node into the DOM before this node (as a preceding sibling).protected Element
Element. doClone(Node parent)
protected LeafNode
LeafNode. doClone(Node parent)
protected Node
Node. doClone(Node parent)
static NodeIterator<Node>
NodeIterator. from(Node start)
Create a NoteIterator that will iterate the supplied node, and all of its descendants.void
Element.TextAccumulator. head(Node node, int depth)
void
Node.OuterHtmlVisitor. head(Node node, int depth)
Element
Element. insertChildren(int index, Node... children)
Inserts the given child nodes into this element at the specified index.(package private) static Range
Range. of(Node node, boolean start)
Retrieves the source range for a given Node.(package private) static Document.OutputSettings
NodeUtils. outputSettings(Node node)
Get the output setting for this node, or if this node has no document (or parent), retrieve the default output settings(package private) static Parser
NodeUtils. parser(Node node)
Get the parser that was used to make this node, or the default HTML parser if it has no parent.Element
Element. prependChild(Node child)
Add a node to the start of this element's children.(package private) static boolean
Element. preserveWhitespace(Node node)
protected void
FormElement. removeChild(Node out)
protected void
Node. removeChild(Node out)
protected void
Node. reparentChild(Node child)
protected void
Node. replaceChild(Node out, Node in)
void
Node. replaceWith(Node in)
Replace this node in the DOM with the supplied node.void
NodeIterator. restart(Node start)
Restart this Iterator from the specified start node.protected void
Node. setParentNode(Node parentNode)
(package private) static <T extends Node>
java.util.stream.Stream<T>NodeUtils. stream(Node start, java.lang.Class<T> type)
Creates a Stream, starting with the supplied node.void
Element.TextAccumulator. tail(Node node, int depth)
void
Node.OuterHtmlVisitor. tail(Node node, int depth)
Method parameters in org.jsoup.nodes with type arguments of type Node Modifier and Type Method Description Element
Element. appendChildren(java.util.Collection<? extends Node> children)
Insert the given nodes to the end of this Element's children.Element
Element. forEachNode(java.util.function.Consumer<? super Node> action)
Node
Node. forEachNode(java.util.function.Consumer<? super Node> action)
Perform the supplied action on this Node and each of its descendants, during a depth-first traversal.Element
Element. insertChildren(int index, java.util.Collection<? extends Node> children)
Inserts the given child nodes into this element at the specified index.Element
Element. prependChildren(java.util.Collection<? extends Node> children)
Insert the given nodes to the start of this Element's children.Constructors in org.jsoup.nodes with parameters of type Node Constructor Description NodeIterator(Node start, java.lang.Class<T> type)
Create a NoteIterator that will iterate the supplied node, and all of its descendants. -
Uses of Node in org.jsoup.parser
Methods in org.jsoup.parser that return types with arguments of type Node Modifier and Type Method Description java.util.List<Node>
StreamParser. completeFragment()
When initialized as a fragment parse, runs the parser until the input is fully read, and returns the completed fragment child nodes.(package private) java.util.List<Node>
HtmlTreeBuilder. completeParseFragment()
(package private) abstract java.util.List<Node>
TreeBuilder. completeParseFragment()
(package private) java.util.List<Node>
XmlTreeBuilder. completeParseFragment()
static java.util.List<Node>
Parser. parseFragment(java.lang.String fragmentHtml, Element context, java.lang.String baseUri)
Parse a fragment of HTML into a list of nodes.static java.util.List<Node>
Parser. parseFragment(java.lang.String fragmentHtml, Element context, java.lang.String baseUri, ParseErrorList errorList)
Parse a fragment of HTML into a list of nodes.(package private) java.util.List<Node>
TreeBuilder. parseFragment(java.lang.String inputFragment, Element context, java.lang.String baseUri, Parser parser)
java.util.List<Node>
Parser. parseFragmentInput(java.lang.String fragment, Element context, java.lang.String baseUri)
static java.util.List<Node>
Parser. parseXmlFragment(java.lang.String fragmentXml, java.lang.String baseUri)
Parse a fragment of XML into a list of nodes.Methods in org.jsoup.parser with parameters of type Node Modifier and Type Method Description void
StreamParser.ElementIterator. head(Node node, int depth)
(package private) void
HtmlTreeBuilder. insertInFosterParent(Node in)
(package private) void
TreeBuilder. onNodeClosed(Node node)
Called by implementing TreeBuilders when a node is explicitly closed.(package private) void
TreeBuilder. onNodeInserted(Node node)
Called by implementing TreeBuilders when a node has been inserted.void
StreamParser.ElementIterator. tail(Node node, int depth)
private void
TreeBuilder. trackNodePosition(Node node, boolean isStart)
-
Uses of Node in org.jsoup.safety
Methods in org.jsoup.safety with parameters of type Node Modifier and Type Method Description void
Cleaner.CleaningVisitor. head(Node source, int depth)
void
Cleaner.CleaningVisitor. tail(Node source, int depth)
-
Uses of Node in org.jsoup.select
Methods in org.jsoup.select with type parameters of type Node Modifier and Type Method Description private <T extends Node>
java.util.List<T>Elements. childNodesOfType(java.lang.Class<T> tClass)
Methods in org.jsoup.select with parameters of type Node Modifier and Type Method Description static NodeFilter.FilterResult
NodeTraversor. filter(NodeFilter filter, Node root)
Run a depth-first filtered traversal of the root and all of its descendants.NodeFilter.FilterResult
NodeFilter. head(Node node, int depth)
Callback for when a node is first visited.void
NodeVisitor. head(Node node, int depth)
Callback for when a node is first visited.default NodeFilter.FilterResult
NodeFilter. tail(Node node, int depth)
Callback for when a node is last visited, after all of its descendants have been visited.default void
NodeVisitor. tail(Node node, int depth)
Callback for when a node is last visited, after all of its descendants have been visited.static void
NodeTraversor. traverse(NodeVisitor visitor, Node root)
Run a depth-first traverse of the root and all of its descendants.
-