Uses of Class
org.jsoup.nodes.Node
Packages that use Node
Package
Description
Contains example programs and use of jsoup.
Package containing classes supporting the core jsoup code.
HTML document structure nodes.
Contains the HTML parser, tag specifications, and HTML tokeniser.
Contains the jsoup HTML cleaner, and safelist definitions.
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 -
Uses of Node in org.jsoup.helper
Methods in org.jsoup.helper with type parameters of type NodeModifier and TypeMethodDescriptionW3CDom.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 -
Uses of Node in org.jsoup.nodes
Classes in org.jsoup.nodes with type parameters of type NodeModifier and TypeClassDescriptionclassNodeIterator<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.nodesModifier and TypeClassDescriptionclassA Character Data node, to support CDATA sections.classA comment node.classA data node, for contents of style, script tags etc, where contents should not show in text().classA HTML Document.classA<!DOCTYPE>node.classAn HTML Element consists of a tag name, attributes, and child nodes (including text nodes and other elements).classAn HTML Form Element provides ready access to the form fields/controls that are associated with it.classA node that does not hold any children.classDeprecated.classA text node.classAn XML Declaration.Fields in org.jsoup.nodes declared as NodeModifier and TypeFieldDescriptionprivate NodeNodeIterator.currentprivate NodeNodeIterator.currentParentprivate TNodeIterator.nextprivate NodeNodeIterator.previousprivate NodeNodeIterator.root(package private) final NodePrinter.rootFields in org.jsoup.nodes with type parameters of type NodeMethods in org.jsoup.nodes with type parameters of type NodeModifier and TypeMethodDescription<T extends Node>
TElement.expectFirstNode(String cssQuery, Class<T> type) Just likeElement.selectFirstNode(String, Class), but if there is no match, throws anIllegalArgumentException.Node.nodeStream(Class<T> type) Returns a Stream of this and descendant nodes, containing only nodes of the specified type.<T extends Node>
TElement.selectFirstNode(String cssQuery, Class<T> type) Find the first Node that matches theSelectorCSS query, with this element as the starting context.<T extends Node>
TElement.selectFirstNode(Evaluator evaluator, Class<T> type) Finds the first Node that matches the supplied Evaluator, with this element as the starting context, ornullif none match.Element.selectNodes(String cssQuery, Class<T> type) Find nodes that match the suppliedSelectorCSS query, with this element as the starting context.Element.selectNodes(Evaluator evaluator, Class<T> type) Find nodes that match the supplied Evaluator, with this element as the starting context.Element.selectXpath(String xpath, Class<T> nodeType) Find Nodes that match the supplied XPath expression.NodeUtils.selectXpath(String xpath, Element el, 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>
Spliterator<T> NodeUtils.spliterator(Iterator<T> iterator) Creates a Stream, starting with the supplied node.Methods in org.jsoup.nodes that return NodeModifier and TypeMethodDescriptionInsert the specified HTML into the DOM after this node (as a following sibling).Insert the specified node into the DOM after this node (as a following sibling).Set an attribute (key=value).Insert the specified HTML into the DOM before this node (as a preceding sibling).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[]Node.childNodesAsArray()Node.clearAttributes()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 NodeLeafNode.empty()abstract NodeNode.empty()Delete all this node's children.Node.filter(NodeFilter nodeFilter) Perform a depth-first controllable traversal through this node and its descendants.Node.firstChild()Gets the first child node of this node, ornullif 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.Node.lastChild()Gets the last child node of this node, ornullif there is none.Node.lastSibling()Gets the last sibling of this node.(package private) static NodePrinter.Pretty.nextNonBlank(Node node) Node.nextSibling()Get this node's next sibling.Node.parent()Gets this node's parent node.final NodeNode.parentNode()Gets this node's parent node.(package private) static NodePrinter.Pretty.previousNonblank(Node node) Node.previousSibling()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.Node.unwrap()Removes this node from the DOM, and moves its children up into the node's parent.Wrap the supplied HTML around this node.Methods in org.jsoup.nodes that return types with arguments of type NodeModifier and TypeMethodDescriptionNode.childNodes()Get this node's children.Node.childNodesCopy()Returns a deep copy of this node's children.Element.ensureChildNodes()LeafNode.ensureChildNodes()Node.ensureChildNodes()static NodeIterator<Node> Create a NoteIterator that will iterate the supplied node, and all of its descendants.Node.nodeStream()Returns a Stream of this Node and all of its descendant Nodes.Element.selectNodes(String cssQuery) Find nodes that match the suppliedSelectorCSS query, with this element as the starting context.Element.selectNodes(Evaluator evaluator) Find nodes that match the suppliedEvaluator, with this element as the starting context.Node.siblingNodes()Retrieves this node's sibling nodes.Methods in org.jsoup.nodes with parameters of type NodeModifier and TypeMethodDescriptionprotected voidNode.addChildren(int index, Node... children) protected voidNode.addChildren(Node... children) Insert the specified node into the DOM after this node (as a following sibling).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.Insert the specified node into the DOM before this node (as a preceding sibling).Insert the specified node into the DOM before this node (as a preceding sibling).protected Elementprotected LeafNodeprotected Nodestatic NodeIterator<Node> Create a NoteIterator that will iterate the supplied node, and all of its descendants.voidvoidElement.insertChildren(int index, Node... children) Inserts the given child nodes into this element at the specified index.(package private) static booleanPrinter.Pretty.isBlankText(Node node) (package private) boolean(package private) boolean(package private) static NodePrinter.Pretty.nextNonBlank(Node node) (package private) static RangeRetrieves the source range for a given Node.(package private) static Document.OutputSettingsNodeUtils.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 ParserGet the parser that was used to make this node, or the default HTML parser if it has no parent.Element.prependChild(Node child) Add a node to the start of this element's children.(package private) static booleanElement.preserveWhitespace(Node node) (package private) static NodePrinter.Pretty.previousNonblank(Node node) (package private) static PrinterPrinter.printerFor(Node root, QuietAppendable accum) protected voidFormElement.removeChild(Node out) protected voidNode.removeChild(Node out) protected voidNode.reparentChild(Node child) protected voidNode.replaceChild(Node out, Node in) voidNode.replaceWith(Node in) Replace this node in the DOM with the supplied node.voidRestart this Iterator from the specified start node.protected voidNode.setParentNode(Node parentNode) (package private) booleanPrinter.Outline.shouldIndent(Node node) (package private) booleanPrinter.Pretty.shouldIndent(Node node) Creates a Stream, starting with the supplied node.(package private) static booleanvoidvoidMethod parameters in org.jsoup.nodes with type arguments of type NodeModifier and TypeMethodDescriptionElement.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.private static StringElement.wholeTextOf(Stream<Node> stream) Constructors in org.jsoup.nodes with parameters of type NodeModifierConstructorDescriptionNodeIterator(Node start, Class<T> type) Create a NoteIterator that will iterate the supplied node, and all of its descendants.(package private)Outline(Node root, QuietAppendable accum, Document.OutputSettings settings) (package private)Pretty(Node root, QuietAppendable accum, Document.OutputSettings settings) (package private)Printer(Node root, QuietAppendable accum, Document.OutputSettings settings) -
Uses of Node in org.jsoup.parser
Methods in org.jsoup.parser that return types with arguments of type NodeModifier and TypeMethodDescriptionStreamParser.completeFragment()When initialized as a fragment parse, runs the parser until the input is fully read, and returns the completed fragment child nodes.HtmlTreeBuilder.completeParseFragment()TreeBuilder.completeParseFragment()XmlTreeBuilder.completeParseFragment()Parser.parseFragment(String fragmentHtml, Element context, String baseUri) Parse a fragment of HTML into a list of nodes.Parser.parseFragment(String fragmentHtml, Element context, String baseUri, ParseErrorList errorList) Parse a fragment of HTML into a list of nodes.TreeBuilder.parseFragment(Reader inputFragment, Element context, String baseUri, Parser parser) Parser.parseFragmentInput(Reader fragment, Element context, String baseUri) Parse a fragment of HTML into a list of nodes.Parser.parseFragmentInput(String fragment, Element context, String baseUri) Parse a fragment of HTML into a list of nodes.Parser.parseXmlFragment(String fragmentXml, String baseUri) Parse a fragment of XML into a list of nodes.Methods in org.jsoup.parser with parameters of type NodeModifier and TypeMethodDescriptionvoid(package private) voidHtmlTreeBuilder.insertInFosterParent(Node in) (package private) voidTreeBuilder.onNodeClosed(Node node) Called by implementing TreeBuilders when a node is explicitly closed.(package private) voidTreeBuilder.onNodeInserted(Node node) Called by implementing TreeBuilders when a node has been inserted.void(package private) voidTreeBuilder.trackNodePosition(Node node, boolean isStart) -
Uses of Node in org.jsoup.safety
Methods in org.jsoup.safety with parameters of type Node -
Uses of Node in org.jsoup.select
Classes in org.jsoup.select with type parameters of type NodeModifier and TypeClassDescriptionclassA list ofNodeobjects, with methods that act on every node in the list.Fields in org.jsoup.select with type parameters of type NodeModifier and TypeFieldDescription(package private) static final SoftPool<NodeIterator<Node>> StructuralEvaluator.Has.NodeIterPoolStructuralEvaluator.threadMemoStructuralEvaluator.threadMemoNodeEvaluator.InstanceType.typeMethods in org.jsoup.select with type parameters of type NodeModifier and TypeMethodDescriptionElements.childNodesOfType(Class<T> tClass) 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>
TCollector.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.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 that return types with arguments of type NodeMethods in org.jsoup.select with parameters of type NodeModifier and TypeMethodDescription(package private) booleanNodeEvaluator.BlankValue.evaluateMatch(Node node) (package private) booleanNodeEvaluator.ContainsValue.evaluateMatch(Node node) (package private) abstract booleanNodeEvaluator.evaluateMatch(Node node) (package private) booleanNodeEvaluator.InstanceType.evaluateMatch(Node node) (package private) booleanNodeEvaluator.MatchesValue.evaluateMatch(Node node) (package private) booleanStructuralEvaluator.Ancestor.evaluateMatch(Element root, Node node) (package private) abstract booleanStructuralEvaluator.evaluateMatch(Element root, Node node) (package private) booleanStructuralEvaluator.Has.evaluateMatch(Element root, Node node) (package private) booleanStructuralEvaluator.ImmediateParentRun.evaluateMatch(Element root, Node node) (package private) booleanStructuralEvaluator.ImmediatePreviousSibling.evaluateMatch(Element root, Node node) (package private) booleanStructuralEvaluator.Is.evaluateMatch(Element root, Node node) (package private) booleanStructuralEvaluator.Not.evaluateMatch(Element root, Node node) (package private) booleanStructuralEvaluator.PreviousSibling.evaluateMatch(Element root, Node node) static NodeFilter.FilterResultNodeTraversor.filter(NodeFilter filter, Node root) Run a depth-first controllable traversal of the root and all of its descendants.Callback for when a node is first visited.voidCallback for when a node is first visited.(package private) final boolean(package private) booleanStructuralEvaluator.memoMatches(Element root, Node node) default NodeFilter.FilterResultCallback for when a node is last visited, after all of its descendants have been visited.default voidCallback for when a node is last visited, after all of its descendants have been visited.default voidRun a depth-first controlled traverse of the root and all of its descendants.static voidNodeTraversor.traverse(NodeVisitor visitor, Node root) Run a depth-first traverse of the root and all of its descendants.default voidRun a depth-first traverse of the root and all of its descendants.Constructors in org.jsoup.select with parameters of type NodeConstructor parameters in org.jsoup.select with type arguments of type NodeModifierConstructorDescription(package private)InstanceType(Class<? extends Node> type, String selector)
Element.selectNodes(String, Class)instead, with selector of::textnodeand classTextNode; will be removed in jsoup 1.24.1.