Package org.jsoup.nodes
Class NodeUtils
- java.lang.Object
-
- org.jsoup.nodes.NodeUtils
-
final class NodeUtils extends java.lang.ObjectInternal helpers for Nodes, to keep the actual node APIs relatively clean. A jsoup internal class, so don't use it as there is no contract API).
-
-
Constructor Summary
Constructors Constructor Description NodeUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static Document.OutputSettingsoutputSettings(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 Parserparser(Node node)Get the parser that was used to make this node, or the default HTML parser if it has no parent.(package private) static <T extends Node>
java.util.List<T>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.
-
-
-
Method Detail
-
outputSettings
static Document.OutputSettings outputSettings(Node node)
Get the output setting for this node, or if this node has no document (or parent), retrieve the default output settings
-
parser
static Parser parser(Node node)
Get the parser that was used to make this node, or the default HTML parser if it has no parent.
-
selectXpath
static <T extends Node> java.util.List<T> 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. The original jsoup elements are then fetched from the w3c doc user data (where we stashed them during conversion). This process could potentially be optimized by transpiling the compiled xpath expression to a jsoup Evaluator when there's 1:1 support, thus saving the W3C document conversion stage.
-
-