Package | Description |
---|---|
org.jsoup.nodes |
HTML document structure nodes.
|
org.jsoup.select |
Packages to support the CSS-style element selector.
|
Modifier and Type | Field and Description |
---|---|
private Elements |
FormElement.elements |
Modifier and Type | Method and 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(java.lang.String key)
Find elements that have a named attribute set.
|
Elements |
Element.getElementsByAttributeStarting(java.lang.String keyPrefix)
Find elements that have an attribute name starting with the supplied prefix.
|
Elements |
Element.getElementsByAttributeValue(java.lang.String key,
java.lang.String value)
Find elements that have an attribute with the specific value.
|
Elements |
Element.getElementsByAttributeValueContaining(java.lang.String key,
java.lang.String match)
Find elements that have attributes whose value contains the match string.
|
Elements |
Element.getElementsByAttributeValueEnding(java.lang.String key,
java.lang.String valueSuffix)
Find elements that have attributes that end with the value suffix.
|
Elements |
Element.getElementsByAttributeValueMatching(java.lang.String key,
java.util.regex.Pattern pattern)
Find elements that have attributes whose values match the supplied regular expression.
|
Elements |
Element.getElementsByAttributeValueMatching(java.lang.String key,
java.lang.String regex)
Find elements that have attributes whose values match the supplied regular expression.
|
Elements |
Element.getElementsByAttributeValueNot(java.lang.String key,
java.lang.String value)
Find elements that either do not have this attribute, or have it with a different value.
|
Elements |
Element.getElementsByAttributeValueStarting(java.lang.String key,
java.lang.String valuePrefix)
Find elements that have attributes that start with the value prefix.
|
Elements |
Element.getElementsByClass(java.lang.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(java.lang.String tagName)
Finds elements, including and recursively under this element, with the specified tag name.
|
Elements |
Element.getElementsContainingOwnText(java.lang.String searchText)
Find elements that directly contain the specified string.
|
Elements |
Element.getElementsContainingText(java.lang.String searchText)
Find elements that contain the specified string.
|
Elements |
Element.getElementsMatchingOwnText(java.util.regex.Pattern pattern)
Find elements whose own text matches the supplied regular expression.
|
Elements |
Element.getElementsMatchingOwnText(java.lang.String regex)
Find elements whose text matches the supplied regular expression.
|
Elements |
Element.getElementsMatchingText(java.util.regex.Pattern pattern)
Find elements whose text matches the supplied regular expression.
|
Elements |
Element.getElementsMatchingText(java.lang.String regex)
Find elements whose text matches the supplied regular expression.
|
Elements |
Element.nextElementSiblings()
Get each of the sibling elements that come after this element.
|
private Elements |
Element.nextElementSiblings(boolean next) |
Elements |
Element.parents()
Get this element's parent and ancestors, up to the document root.
|
Elements |
Element.previousElementSiblings()
Get each of the element siblings before this element.
|
Elements |
Element.select(java.lang.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 and Description |
---|---|
private static void |
Element.accumulateParents(Element el,
Elements parents) |
Modifier and Type | Field and Description |
---|---|
private Elements |
Collector.Accumulator.elements |
Modifier and Type | Method and Description |
---|---|
Elements |
Elements.addClass(java.lang.String className)
Add the class name to every matched element's
class attribute. |
Elements |
Elements.after(java.lang.String html)
Insert the supplied HTML after each matched element's outer HTML.
|
Elements |
Elements.append(java.lang.String html)
Add the supplied HTML to the end of each matched element's inner HTML.
|
Elements |
Elements.attr(java.lang.String attributeKey,
java.lang.String attributeValue)
Set an attribute on all matched elements.
|
Elements |
Elements.before(java.lang.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.
|
(package private) static Elements |
Selector.filterOut(java.util.Collection<Element> elements,
java.util.Collection<Element> outs) |
Elements |
Elements.html(java.lang.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(java.lang.String query)
Get the immediate next element sibling of each element in this list, filtered by the query.
|
Elements |
Elements.nextAll()
Get each of the following element siblings of each element in this list.
|
Elements |
Elements.nextAll(java.lang.String query)
Get each of the following element siblings of each element in this list, that match the query.
|
Elements |
Elements.not(java.lang.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(java.lang.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(java.lang.String query)
Get the immediate previous element sibling of each element in this list, filtered by the query.
|
Elements |
Elements.prevAll()
Get each of the previous element siblings of each element in this list.
|
Elements |
Elements.prevAll(java.lang.String query)
Get each of the previous element siblings of each element in this list, that match the query.
|
Elements |
Elements.remove()
Remove each matched element from the DOM.
|
Elements |
Elements.removeAttr(java.lang.String attributeKey)
Remove an attribute from every matched element.
|
Elements |
Elements.removeClass(java.lang.String className)
Remove the class name from every matched element's
class attribute, if present. |
static Elements |
Selector.select(Evaluator evaluator,
Element root)
Find elements matching selector.
|
Elements |
Elements.select(java.lang.String query)
Find matching elements within this element list.
|
static Elements |
Selector.select(java.lang.String query,
Element root)
Find elements matching selector.
|
static Elements |
Selector.select(java.lang.String query,
java.lang.Iterable<Element> roots)
Find elements matching selector.
|
private Elements |
Elements.siblings(java.lang.String query,
boolean next,
boolean all) |
Elements |
Elements.tagName(java.lang.String tagName)
Update the tag name of each matched element.
|
Elements |
Elements.toggleClass(java.lang.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(java.lang.String value)
Set the form element's value in each of the matched elements.
|
Elements |
Elements.wrap(java.lang.String html)
Wrap the supplied HTML around each matched elements.
|
Modifier and Type | Method and 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.
|
Constructor and Description |
---|
Accumulator(Element root,
Elements elements,
Evaluator eval) |