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