Package | Description |
---|---|
org.jsoup.nodes |
HTML document structure nodes.
|
org.jsoup.select |
Packages to support the CSS-style element selector.
|
Modifier and Type | Method | Description |
---|---|---|
Elements |
Element.children() |
Get this element's child elements.
|
Elements |
FormElement.elements() |
Get the list of form control elements associated with this form.
|
Elements |
Element.getAllElements() |
Find all elements under this element (including self, and children of children).
|
Elements |
Element.getElementsByAttribute(String key) |
Find elements that have a named attribute set.
|
Elements |
Element.getElementsByAttributeStarting(String keyPrefix) |
Find elements that have an attribute name starting with the supplied prefix.
|
Elements |
Element.getElementsByAttributeValue(String key,
String value) |
Find elements that have an attribute with the specific value.
|
Elements |
Element.getElementsByAttributeValueContaining(String key,
String match) |
Find elements that have attributes whose value contains the match string.
|
Elements |
Element.getElementsByAttributeValueEnding(String key,
String valueSuffix) |
Find elements that have attributes that end with the value suffix.
|
Elements |
Element.getElementsByAttributeValueMatching(String key,
String regex) |
Find elements that have attributes whose values match the supplied regular expression.
|
Elements |
Element.getElementsByAttributeValueMatching(String key,
Pattern pattern) |
Find elements that have attributes whose values match the supplied regular expression.
|
Elements |
Element.getElementsByAttributeValueNot(String key,
String value) |
Find elements that either do not have this attribute, or have it with a different value.
|
Elements |
Element.getElementsByAttributeValueStarting(String key,
String valuePrefix) |
Find elements that have attributes that start with the value prefix.
|
Elements |
Element.getElementsByClass(String className) |
Find elements that have this class, including or under this element.
|
Elements |
Element.getElementsByIndexEquals(int index) |
Find elements whose sibling index is equal to the supplied index.
|
Elements |
Element.getElementsByIndexGreaterThan(int index) |
Find elements whose sibling index is greater than the supplied index.
|
Elements |
Element.getElementsByIndexLessThan(int index) |
Find elements whose sibling index is less than the supplied index.
|
Elements |
Element.getElementsByTag(String tagName) |
Finds elements, including and recursively under this element, with the specified tag name.
|
Elements |
Element.getElementsContainingOwnText(String searchText) |
Find elements that directly contain the specified string.
|
Elements |
Element.getElementsContainingText(String searchText) |
Find elements that contain the specified string.
|
Elements |
Element.getElementsMatchingOwnText(String regex) |
Find elements whose text matches the supplied regular expression.
|
Elements |
Element.getElementsMatchingOwnText(Pattern pattern) |
Find elements whose own text matches the supplied regular expression.
|
Elements |
Element.getElementsMatchingText(String regex) |
Find elements whose text matches the supplied regular expression.
|
Elements |
Element.getElementsMatchingText(Pattern pattern) |
Find elements whose text matches the supplied regular expression.
|
Elements |
Element.parents() |
Get this element's parent and ancestors, up to the document root.
|
Elements |
Element.select(String cssQuery) |
Find elements that match the
Selector CSS query, with this element as the starting context. |
Elements |
Element.siblingElements() |
Get sibling elements.
|
Modifier and Type | Method | Description |
---|---|---|
Elements |
Elements.addClass(String className) |
Add the class name to every matched element's
class attribute. |
Elements |
Elements.after(String html) |
Insert the supplied HTML after each matched element's outer HTML.
|
Elements |
Elements.append(String html) |
Add the supplied HTML to the end of each matched element's inner HTML.
|
Elements |
Elements.attr(String attributeKey,
String attributeValue) |
Set an attribute on all matched elements.
|
Elements |
Elements.before(String html) |
Insert the supplied HTML before each matched element's outer HTML.
|
Elements |
Elements.clone() |
Creates a deep copy of these elements.
|
static Elements |
Collector.collect(Evaluator eval,
Element root) |
Build a list of elements, by visiting root and every descendant of root, and testing it against the evaluator.
|
Elements |
Elements.empty() |
Empty (remove all child nodes from) each matched element.
|
Elements |
Elements.eq(int index) |
Get the nth matched element as an Elements object.
|
Elements |
Elements.filter(NodeFilter nodeFilter) |
Perform a depth-first filtering on each of the selected elements.
|
Elements |
Elements.html(String html) |
Set the inner HTML of each matched element.
|
Elements |
Elements.next() |
Get the immediate next element sibling of each element in this list.
|
Elements |
Elements.next(String query) |
Get the immediate next element sibling of each element in this list, filtered by the query.
|
Elements |
Elements.nextAll() |
Get all of the following element siblings of each element in this list.
|
Elements |
Elements.nextAll(String query) |
Get all of the following element siblings of each element in this list, filtered by the query.
|
Elements |
Elements.not(String query) |
Remove elements from this list that match the
Selector query. |
Elements |
Elements.parents() |
Get all of the parents and ancestor elements of the matched elements.
|
Elements |
Elements.prepend(String html) |
Add the supplied HTML to the start of each matched element's inner HTML.
|
Elements |
Elements.prev() |
Get the immediate previous element sibling of each element in this list.
|
Elements |
Elements.prev(String query) |
Get the immediate previous element sibling of each element in this list, filtered by the query.
|
Elements |
Elements.prevAll() |
Get all of the previous element siblings of each element in this list.
|
Elements |
Elements.prevAll(String query) |
Get all of the previous element siblings of each element in this list, filtered by the query.
|
Elements |
Elements.remove() |
Remove each matched element from the DOM.
|
Elements |
Elements.removeAttr(String attributeKey) |
Remove an attribute from every matched element.
|
Elements |
Elements.removeClass(String className) |
Remove the class name from every matched element's
class attribute, if present. |
Elements |
Elements.select(String query) |
Find matching elements within this element list.
|
static Elements |
Selector.select(String query,
Iterable<Element> roots) |
Find elements matching selector.
|
static Elements |
Selector.select(String query,
Element root) |
Find elements matching selector.
|
static Elements |
Selector.select(Evaluator evaluator,
Element root) |
Find elements matching selector.
|
Elements |
Elements.tagName(String tagName) |
Update the tag name of each matched element.
|
Elements |
Elements.toggleClass(String className) |
Toggle the class name on every matched element's
class attribute. |
Elements |
Elements.traverse(NodeVisitor nodeVisitor) |
Perform a depth-first traversal on each of the selected elements.
|
Elements |
Elements.unwrap() |
Removes the matched elements from the DOM, and moves their children up into their parents.
|
Elements |
Elements.val(String value) |
Set the form element's value in each of the matched elements.
|
Elements |
Elements.wrap(String html) |
Wrap the supplied HTML around each matched elements.
|
Modifier and Type | Method | Description |
---|---|---|
static void |
NodeTraversor.filter(NodeFilter filter,
Elements elements) |
Start a depth-first filtering of all elements.
|
static void |
NodeTraversor.traverse(NodeVisitor visitor,
Elements elements) |
Start a depth-first traverse of all elements.
|
Copyright © 2009–2018 Jonathan Hedley. All rights reserved.