Uses of Class
org.jsoup.nodes.Node

Packages that use Node
Package
Description
Package containing classes supporting the core jsoup code.
HTML document structure nodes.
Contains the HTML parser, tag specifications, and HTML tokeniser.
Packages to support the CSS-style element selector.
  • 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>
    List<T>
    W3CDom.sourceNodes(NodeList nodeList, 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
    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 
    A Character Data node, to support CDATA sections.
    class 
    A comment node.
    class 
    A data node, for contents of style, script tags etc, where contents should not show in text().
    class 
    A HTML Document.
    class 
    A <!DOCTYPE> node.
    class 
    An HTML Element consists of a tag name, attributes, and child nodes (including text nodes and other elements).
    class 
    An HTML Form Element provides ready access to the form fields/controls that are associated with it.
    class 
    A node that does not hold any children.
    class 
    Deprecated.
    class 
    A text node.
    class 
    An XML Declaration.
    Methods in org.jsoup.nodes with type parameters of type Node
    Modifier and Type
    Method
    Description
    <T extends Node>
    T
    Element.expectFirstNode(String cssQuery, Class<T> type)
    Just like Element.selectFirstNode(String, Class), but if there is no match, throws an IllegalArgumentException.
    <T extends Node>
    Stream<T>
    Node.nodeStream(Class<T> type)
    Returns a Stream of this and descendant nodes, containing only nodes of the specified type.
    <T extends Node>
    @Nullable T
    Element.selectFirstNode(String cssQuery, Class<T> type)
    Find the first Node that matches the Selector CSS query, with this element as the starting context.
    <T extends Node>
    @Nullable T
    Element.selectFirstNode(Evaluator evaluator, Class<T> type)
    Finds the first Node that matches the supplied Evaluator, with this element as the starting context, or null if none match.
    <T extends Node>
    Nodes<T>
    Element.selectNodes(String cssQuery, Class<T> type)
    Find nodes that match the supplied Selector CSS query, with this element as the starting context.
    <T extends Node>
    Nodes<T>
    Element.selectNodes(Evaluator evaluator, Class<T> type)
    Find nodes that match the supplied Evaluator, with this element as the starting context.
    <T extends Node>
    List<T>
    Element.selectXpath(String xpath, Class<T> nodeType)
    Find Nodes that match the supplied XPath expression.
    Methods in org.jsoup.nodes that return Node
    Modifier and Type
    Method
    Description
    Node.after(String html)
    Insert the specified HTML into the DOM after this node (as a following sibling).
    Node.after(Node node)
    Insert the specified node into the DOM after this node (as a following sibling).
    LeafNode.attr(String key, String value)
     
    Node.attr(String attributeKey, String attributeValue)
    Set an attribute (key=value).
    Node.before(String html)
    Insert the specified HTML into the DOM before this node (as a preceding sibling).
    Node.before(Node node)
    Insert the specified node into the DOM before this node (as a preceding sibling).
    Node.childNode(int index)
    Get a child node by its 0-based index.
    protected Node[]
     
    Clear (remove) each of the attributes in this node.
    Node.clone()
    Create a stand-alone, deep copy of this node, and all of its children.
    protected Node
    Node.doClone(@Nullable Node parent)
     
    LeafNode.empty()
     
    abstract Node
    Node.empty()
    Delete all this node's children.
    Node.filter(NodeFilter nodeFilter)
    Perform a depth-first controllable traversal through this node and its descendants.
    @Nullable Node
    Node.firstChild()
    Gets the first child node of this node, or null if there is none.
    Node.firstSibling()
    Gets the first sibling of this node.
    Node.forEachNode(Consumer<? super Node> action)
    Perform the supplied action on this Node and each of its descendants, during a depth-first traversal.
    @Nullable Node
    Node.lastChild()
    Gets the last child node of this node, or null if there is none.
    Node.lastSibling()
    Gets the last sibling of this node.
    @Nullable Node
    Node.nextSibling()
    Get this node's next sibling.
    @Nullable Node
    Node.parent()
    Gets this node's parent node.
    final @Nullable Node
    Node.parentNode()
    Gets this node's parent node.
    @Nullable Node
    Get this node's previous sibling.
    LeafNode.removeAttr(String key)
     
    Node.removeAttr(String attributeKey)
    Remove an attribute from this node.
    Node.root()
    Get this node's root node; that is, its topmost ancestor.
    Node.shallowClone()
    Create a stand-alone, shallow copy of this node.
    Node.traverse(NodeVisitor nodeVisitor)
    Perform a depth-first traversal through this node and its descendants.
    @Nullable Node
    Node.unwrap()
    Removes this node from the DOM, and moves its children up into the node's parent.
    Node.wrap(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
    List<Node>
    Node.childNodes()
    Get this node's children.
    List<Node>
    Returns a deep copy of this node's children.
    protected List<Node>
    Element.ensureChildNodes()
     
    protected List<Node>
    LeafNode.ensureChildNodes()
     
    protected abstract List<Node>
     
    static NodeIterator<Node>
    NodeIterator.from(Node start)
    Create a NoteIterator that will iterate the supplied node, and all of its descendants.
    Stream<Node>
    Node.nodeStream()
    Returns a Stream of this Node and all of its descendant Nodes.
    Element.selectNodes(String cssQuery)
    Find nodes that match the supplied Selector CSS query, with this element as the starting context.
    Element.selectNodes(Evaluator evaluator)
    Find nodes that match the supplied Evaluator, with this element as the starting context.
    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.after(Node node)
    Insert the specified node into the DOM after this node (as a following sibling).
    Node.after(Node node)
    Insert the specified node into the DOM after this node (as a following sibling).
    Element.appendChild(Node child)
    Insert a node to the end of this Element's children.
    Element.before(Node node)
    Insert the specified node into the DOM before this node (as a preceding sibling).
    Node.before(Node node)
    Insert the specified node into the DOM before this node (as a preceding sibling).
    protected Element
    Element.doClone(@Nullable Node parent)
     
    protected LeafNode
    LeafNode.doClone(Node parent)
     
    protected Node
    Node.doClone(@Nullable Node parent)
     
    static NodeIterator<Node>
    NodeIterator.from(Node start)
    Create a NoteIterator that will iterate the supplied node, and all of its descendants.
    Element.insertChildren(int index, Node... children)
    Inserts the given child nodes into this element at the specified index.
    Element.prependChild(Node child)
    Add a node to the start of this element's children.
    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)
     
    Method parameters in org.jsoup.nodes with type arguments of type Node
    Modifier and Type
    Method
    Description
    Element.appendChildren(Collection<? extends Node> children)
    Insert the given nodes to the end of this Element's children.
    Element.forEachNode(Consumer<? super Node> action)
     
    Node.forEachNode(Consumer<? super Node> action)
    Perform the supplied action on this Node and each of its descendants, during a depth-first traversal.
    Element.insertChildren(int index, Collection<? extends Node> children)
    Inserts the given child nodes into this element at the specified index.
    Element.prependChildren(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
    Modifier
    Constructor
    Description
     
    NodeIterator(Node start, 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
    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.
    static List<Node>
    Parser.parseFragment(String fragmentHtml, Element context, String baseUri)
    Parse a fragment of HTML into a list of nodes.
    static List<Node>
    Parser.parseFragment(String fragmentHtml, Element context, String baseUri, ParseErrorList errorList)
    Parse a fragment of HTML into a list of nodes.
    List<Node>
    Parser.parseFragmentInput(Reader fragment, @Nullable Element context, String baseUri)
    Parse a fragment of HTML into a list of nodes.
    List<Node>
    Parser.parseFragmentInput(String fragment, @Nullable Element context, String baseUri)
    Parse a fragment of HTML into a list of nodes.
    static List<Node>
    Parser.parseXmlFragment(String fragmentXml, String baseUri)
    Parse a fragment of XML into a list of nodes.
  • Uses of Node in org.jsoup.select

    Classes in org.jsoup.select with type parameters of type Node
    Modifier and Type
    Class
    Description
    class 
    Nodes<T extends Node>
    A list of Node objects, with methods that act on every node in the list.
    Methods in org.jsoup.select with type parameters of type Node
    Modifier and Type
    Method
    Description
    static <T extends Node>
    Nodes<T>
    Collector.collectNodes(Evaluator evaluator, Element root, Class<T> type)
    Build a list of nodes that match the supplied criteria, by visiting the root and every descendant of root, and testing it against the Evaluator.
    static <T extends Node>
    @Nullable T
    Collector.findFirstNode(Evaluator eval, Element root, Class<T> type)
    Finds the first Node that matches the Evaluator that descends from the root, and stops the query once that first match is found.
    static <T extends Node>
    Stream<T>
    Collector.streamNodes(Evaluator evaluator, Element root, Class<T> type)
    Obtain a Stream of nodes, of the specified type, by visiting the root and every descendant of root and testing it against the evaluator.
    Methods in org.jsoup.select with parameters of type Node
    Modifier and Type
    Method
    Description
    NodeTraversor.filter(NodeFilter filter, Node root)
    Run a depth-first filtered traversal of the root and all of its descendants.
    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.
    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.
    default void
    NodeFilter.traverse(Node root)
    Run a depth-first controlled traverse of the root and all of its descendants.
    static void
    NodeTraversor.traverse(NodeVisitor visitor, Node root)
    Run a depth-first traverse of the root and all of its descendants.
    default void
    NodeVisitor.traverse(Node root)
    Run a depth-first traverse of the root and all of its descendants.
    Constructors in org.jsoup.select with parameters of type Node
    Modifier
    Constructor
    Description
     
    Nodes(T... nodes)