Example usage for Java org.jsoup.nodes Document fields, constructors, methods, implement or subclass
The text is from its open source code.
OutputSettings | outputSettings |
String | location |
Document(String baseUri) Create a new, empty Document. |
Element | append(String html) Add inner HTML to this element. |
Element | appendChild(Node child) Add a node child node to this element. |
String | baseUri() |
Element | body() Accessor to the document's body element. |
void | charset(Charset charset) Sets the charset used in this document. |
Element | child(int index) Get a child element of this element, by its 0-based index number. |
List | childNodes() Get this node's children. |
Elements | children() Get this element's child elements. |
Document | clone() |
Element | createElement(String tagName) Create a new Element, with this document's base uri. |
Document | createShell(String baseUri) Create a valid, empty shell of a document, suitable for adding more elements to. |
String | data() Get the combined data of this element. |
Element | empty() Remove all of the element's child nodes. |
Elements | getAllElements() Find all elements under this element (including self, and children of children). |
Element | getElementById(String id) Find an element by ID, including or under this element. |
Elements | getElementsByAttribute(String key) Find elements that have a named attribute set. |
Elements | getElementsByAttributeStarting(String keyPrefix) Find elements that have an attribute name starting with the supplied prefix. |
Elements | getElementsByAttributeValue(String key, String value) Find elements that have an attribute with the specific value. |
Elements | getElementsByAttributeValueContaining(String key, String match) Find elements that have attributes whose value contains the match string. |
Elements | getElementsByAttributeValueEnding(String key, String valueSuffix) Find elements that have attributes that end with the value suffix. |
Elements | getElementsByAttributeValueMatching(String key, Pattern pattern) Find elements that have attributes whose values match the supplied regular expression. |
Elements | getElementsByAttributeValueStarting(String key, String valuePrefix) Find elements that have attributes that start with the value prefix. |
Elements | getElementsByClass(String className) Find elements that have this class, including or under this element. |
Elements | getElementsByTag(String tagName) Finds elements, including and recursively under this element, with the specified tag name. |
Elements | getElementsContainingOwnText(String searchText) Find elements that directly contain the specified string. |
Elements | getElementsContainingText(String searchText) Find elements that contain the specified string. |
Elements | getElementsMatchingOwnText(Pattern pattern) Find elements whose own text matches the supplied regular expression. |
Elements | getElementsMatchingText(Pattern pattern) Find elements whose text matches the supplied regular expression. |
boolean | hasSameValue(Object o) Check if this node is has the same content as another node. |
Element | head() Accessor to the document's head element. |
String | html() Retrieves the element's inner HTML. |
T | html(T appendable) |
Element | insertChildren(int index, Collection extends Node> children) Inserts the given child nodes into this element at the specified index. |
Document | normalise() Normalise the document. |
String | outerHtml() |
Element | prepend(String html) Add inner HTML into this element. |
Elements | select(String cssQuery) Find elements that match the Selector CSS query, with this element as the starting context. |
void | setBaseUri(final String baseUri) Update the base URI of this node and all of its descendants. |
String | text() Gets the combined text of this element and all its children. |
String | title() Get the string contents of the document's title element. |
String | toString() Gets this node's outer HTML. |
Node | traverse(NodeVisitor nodeVisitor) Perform a depth-first traversal through this node and its descendants. |