Package | Description |
---|---|
org.jsoup.helper | |
org.jsoup.nodes |
HTML document structure nodes.
|
org.jsoup.parser |
Contains the HTML parser, tag specifications, and HTML tokeniser.
|
org.jsoup.select |
Packages to support the CSS-style element selector.
|
Modifier and Type | Method | Description |
---|---|---|
void |
W3CDom.W3CBuilder.head(Node source,
int depth) |
|
void |
W3CDom.W3CBuilder.tail(Node source,
int depth) |
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 |
A 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 |
PseudoTextElement |
|
class |
TextNode |
A text node.
|
class |
XmlDeclaration |
An XML Declaration.
|
Modifier and Type | Method | Description |
---|---|---|
Node |
Node.after(String html) |
Insert the specified HTML into the DOM after this node (i.e.
|
Node |
Node.after(Node node) |
Insert the specified node into the DOM after this node (i.e.
|
Node |
Node.attr(String attributeKey,
String attributeValue) |
Set an attribute (key=value).
|
Node |
Node.before(String html) |
Insert the specified HTML into the DOM before this node (i.e.
|
Node |
Node.before(Node node) |
Insert the specified node into the DOM before this node (i.e.
|
Node |
Node.childNode(int index) |
Get a child node by its 0-based index.
|
protected Node[] |
Node.childNodesAsArray() |
|
Node |
Node.clearAttributes() |
Clear (remove) all 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 |
Node.filter(NodeFilter nodeFilter) |
Perform a depth-first filtering through this node and its descendants.
|
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 |
Node.removeAttr(String attributeKey) |
Remove an attribute from this element.
|
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(String html) |
Wrap the supplied HTML around this node.
|
Modifier and Type | Method | Description |
---|---|---|
List<Node> |
Node.childNodes() |
Get this node's children.
|
List<Node> |
Node.childNodesCopy() |
Returns a deep copy of this node's children.
|
protected List<Node> |
Element.ensureChildNodes() |
|
protected abstract List<Node> |
Node.ensureChildNodes() |
|
List<Node> |
Node.siblingNodes() |
Retrieves this node's sibling nodes.
|
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 (i.e.
|
Element |
Element.appendChild(Node child) |
Add a node child node to this element.
|
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 (i.e.
|
protected Element |
Element.doClone(Node parent) |
|
protected Node |
Node.doClone(Node parent) |
|
Element |
Element.insertChildren(int index,
Node... children) |
Inserts the given child nodes into this element at the specified index.
|
Element |
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.
|
protected void |
Node.setParentNode(Node parentNode) |
Modifier and Type | Method | Description |
---|---|---|
Element |
Element.insertChildren(int index,
Collection<? extends Node> children) |
Inserts the given child nodes into this element at the specified index.
|
Modifier and Type | Method | Description |
---|---|---|
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.
|
static List<Node> |
Parser.parseXmlFragment(String fragmentXml,
String baseUri) |
Parse a fragment of XML into a list of nodes.
|
Modifier and Type | Method | Description |
---|---|---|
static NodeFilter.FilterResult |
NodeTraversor.filter(NodeFilter filter,
Node root) |
Start a depth-first filtering 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.
|
NodeFilter.FilterResult |
NodeFilter.tail(Node node,
int depth) |
Callback for when a node is last visited, after all of its descendants have been visited.
|
void |
NodeVisitor.tail(Node node,
int depth) |
Callback for when a node is last visited, after all of its descendants have been visited.
|
void |
NodeTraversor.traverse(Node root) |
Deprecated.
Just use the static
NodeTraversor.filter(NodeFilter, Node) method. |
static void |
NodeTraversor.traverse(NodeVisitor visitor,
Node root) |
Start a depth-first traverse of the root and all of its descendants.
|
Copyright © 2009–2018 Jonathan Hedley. All rights reserved.