Package | Description |
---|---|
org.jsoup.examples |
Contains example programs and use of jsoup.
|
org.jsoup.helper | |
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 whitelist definitions.
|
org.jsoup.select |
Packages to support the CSS-style element selector.
|
Modifier and Type | Method and Description |
---|---|
void |
HtmlToPlainText.FormattingVisitor.head(Node node,
int depth) |
void |
HtmlToPlainText.FormattingVisitor.tail(Node node,
int depth) |
Modifier and Type | Method and Description |
---|---|
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) |
Modifier and Type | Class and 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.
|
(package private) class |
LeafNode |
class |
PseudoTextElement
|
class |
TextNode
A text node.
|
class |
XmlDeclaration
An XML Declaration.
|
Modifier and Type | Field and Description |
---|---|
(package private) Node |
Node.parentNode |
Modifier and Type | Field and Description |
---|---|
(package private) java.util.List<Node> |
Element.childNodes |
private static java.util.List<Node> |
Element.EMPTY_NODES |
private static java.util.List<Node> |
LeafNode.EmptyNodes |
Modifier and Type | Method and Description |
---|---|
Node |
Node.after(Node node)
Insert the specified node into the DOM after this node (i.e.
|
Node |
Node.after(java.lang.String html)
Insert the specified HTML into the DOM after this node (i.e.
|
Node |
Node.attr(java.lang.String attributeKey,
java.lang.String attributeValue)
Set an attribute (key=value).
|
Node |
LeafNode.attr(java.lang.String key,
java.lang.String value) |
Node |
Node.before(Node node)
Insert the specified node into the DOM before this node (i.e.
|
Node |
Node.before(java.lang.String html)
Insert the specified HTML 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) |
abstract Node |
Node.empty()
Delete all this node's children.
|
Node |
LeafNode.empty() |
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(java.lang.String attributeKey)
Remove an attribute from this node.
|
Node |
LeafNode.removeAttr(java.lang.String key) |
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.
|
Modifier and Type | Method and 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 abstract java.util.List<Node> |
Node.ensureChildNodes() |
protected java.util.List<Node> |
Element.ensureChildNodes() |
protected java.util.List<Node> |
LeafNode.ensureChildNodes() |
java.util.List<Node> |
Node.siblingNodes()
Retrieves this node's sibling nodes.
|
Modifier and Type | Method and Description |
---|---|
protected void |
Node.addChildren(int index,
Node... children) |
protected void |
Node.addChildren(Node... children) |
Node |
Node.after(Node node)
Insert the specified node into the DOM after this node (i.e.
|
Element |
Element.after(Node node)
Insert the specified node into the DOM after this node (as a following sibling).
|
Element |
Element.appendChild(Node child)
Add a node child node to this element.
|
Node |
Node.before(Node node)
Insert the specified node into the DOM before this node (i.e.
|
Element |
Element.before(Node node)
Insert the specified node into the DOM before this node (as a preceding sibling).
|
protected Node |
Node.doClone(Node parent) |
protected Element |
Element.doClone(Node parent) |
protected LeafNode |
LeafNode.doClone(Node parent) |
private Element |
Document.findFirstElementByTagName(java.lang.String tag,
Node node) |
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 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.
|
protected void |
Node.setParentNode(Node parentNode) |
void |
Node.OuterHtmlVisitor.tail(Node node,
int depth) |
Modifier and Type | Method and Description |
---|---|
Element |
Element.insertChildren(int index,
java.util.Collection<? extends Node> children)
Inserts the given child nodes into this element at the specified index.
|
Modifier and Type | Method and Description |
---|---|
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) abstract java.util.List<Node> |
TreeBuilder.parseFragment(java.lang.String inputFragment,
Element context,
java.lang.String baseUri,
Parser parser) |
(package private) java.util.List<Node> |
HtmlTreeBuilder.parseFragment(java.lang.String inputFragment,
Element context,
java.lang.String baseUri,
Parser parser) |
(package private) java.util.List<Node> |
XmlTreeBuilder.parseFragment(java.lang.String inputFragment,
Element context,
java.lang.String baseUri,
Parser parser) |
(package private) java.util.List<Node> |
XmlTreeBuilder.parseFragment(java.lang.String inputFragment,
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.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
HtmlTreeBuilder.insertInFosterParent(Node in) |
private void |
HtmlTreeBuilder.insertNode(Node node) |
private void |
XmlTreeBuilder.insertNode(Node node) |
Modifier and Type | Method and Description |
---|---|
void |
Cleaner.CleaningVisitor.head(Node source,
int depth) |
void |
Cleaner.CleaningVisitor.tail(Node source,
int depth) |
Modifier and Type | Method and Description |
---|---|
private <T extends Node> |
Elements.nodesOfType(java.lang.Class<T> tClass) |
Modifier and Type | Method and 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 |
Collector.Accumulator.head(Node node,
int depth) |
NodeFilter.FilterResult |
Collector.FirstFinder.head(Node node,
int depth) |
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 |
Collector.Accumulator.tail(Node node,
int depth) |
NodeFilter.FilterResult |
Collector.FirstFinder.tail(Node node,
int depth) |
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)
Start a depth-first traverse of the root and all of its descendants.
|