Showing preview only (2,601K chars total). Download the full file or copy to clipboard to get everything.
Repository: jhy/jsoup
Branch: master
Commit: 8951f55c5965
Files: 237
Total size: 2.4 MB
Directory structure:
gitextract_knobfku8/
├── .gitattributes
├── .github/
│ ├── dependabot.yml
│ └── workflows/
│ ├── build.yml
│ ├── cifuzz.yml
│ └── codeql.yml
├── .gitignore
├── CHANGES.md
├── LICENSE
├── README.md
├── SECURITY.md
├── change-archive.txt
├── pom.xml
└── src/
├── main/
│ ├── java/
│ │ └── org/
│ │ └── jsoup/
│ │ ├── Connection.java
│ │ ├── HttpStatusException.java
│ │ ├── Jsoup.java
│ │ ├── Progress.java
│ │ ├── SerializationException.java
│ │ ├── UnsupportedMimeTypeException.java
│ │ ├── examples/
│ │ │ ├── HtmlToPlainText.java
│ │ │ ├── ListLinks.java
│ │ │ ├── Wikipedia.java
│ │ │ └── package-info.java
│ │ ├── helper/
│ │ │ ├── AuthenticationHandler.java
│ │ │ ├── CookieUtil.java
│ │ │ ├── DataUtil.java
│ │ │ ├── HttpConnection.java
│ │ │ ├── Re2jRegex.java
│ │ │ ├── Regex.java
│ │ │ ├── RequestAuthenticator.java
│ │ │ ├── RequestDispatch.java
│ │ │ ├── RequestExecutor.java
│ │ │ ├── UrlBuilder.java
│ │ │ ├── UrlConnectionExecutor.java
│ │ │ ├── Validate.java
│ │ │ ├── ValidationException.java
│ │ │ ├── W3CDom.java
│ │ │ └── package-info.java
│ │ ├── internal/
│ │ │ ├── ControllableInputStream.java
│ │ │ ├── Functions.java
│ │ │ ├── Normalizer.java
│ │ │ ├── QuietAppendable.java
│ │ │ ├── SharedConstants.java
│ │ │ ├── SimpleBufferedInput.java
│ │ │ ├── SimpleStreamReader.java
│ │ │ ├── SoftPool.java
│ │ │ ├── StringUtil.java
│ │ │ └── package-info.java
│ │ ├── nodes/
│ │ │ ├── Attribute.java
│ │ │ ├── Attributes.java
│ │ │ ├── CDataNode.java
│ │ │ ├── Comment.java
│ │ │ ├── DataNode.java
│ │ │ ├── Document.java
│ │ │ ├── DocumentType.java
│ │ │ ├── Element.java
│ │ │ ├── Entities.java
│ │ │ ├── EntitiesData.java
│ │ │ ├── FormElement.java
│ │ │ ├── LeafNode.java
│ │ │ ├── Node.java
│ │ │ ├── NodeIterator.java
│ │ │ ├── NodeUtils.java
│ │ │ ├── Printer.java
│ │ │ ├── PseudoTextElement.java
│ │ │ ├── Range.java
│ │ │ ├── TextNode.java
│ │ │ ├── XmlDeclaration.java
│ │ │ └── package-info.java
│ │ ├── package-info.java
│ │ ├── parser/
│ │ │ ├── CharacterReader.java
│ │ │ ├── HtmlTreeBuilder.java
│ │ │ ├── HtmlTreeBuilderState.java
│ │ │ ├── ParseError.java
│ │ │ ├── ParseErrorList.java
│ │ │ ├── ParseSettings.java
│ │ │ ├── Parser.java
│ │ │ ├── StreamParser.java
│ │ │ ├── Tag.java
│ │ │ ├── TagSet.java
│ │ │ ├── Token.java
│ │ │ ├── TokenData.java
│ │ │ ├── TokenQueue.java
│ │ │ ├── Tokeniser.java
│ │ │ ├── TokeniserState.java
│ │ │ ├── TreeBuilder.java
│ │ │ ├── XmlTreeBuilder.java
│ │ │ └── package-info.java
│ │ ├── safety/
│ │ │ ├── Cleaner.java
│ │ │ ├── Safelist.java
│ │ │ └── package-info.java
│ │ └── select/
│ │ ├── Collector.java
│ │ ├── CombiningEvaluator.java
│ │ ├── Elements.java
│ │ ├── Evaluator.java
│ │ ├── NodeEvaluator.java
│ │ ├── NodeFilter.java
│ │ ├── NodeTraversor.java
│ │ ├── NodeVisitor.java
│ │ ├── Nodes.java
│ │ ├── QueryParser.java
│ │ ├── Selector.java
│ │ ├── StructuralEvaluator.java
│ │ └── package-info.java
│ ├── java11/
│ │ ├── module-info.java
│ │ └── org/
│ │ └── jsoup/
│ │ └── helper/
│ │ ├── HttpClientExecutor.java
│ │ └── RequestAuthHandler.java
│ ├── javadoc/
│ │ └── overview.html
│ └── resources/
│ └── META-INF/
│ └── proguard/
│ └── org.jsoup_jsoup.pro
└── test/
├── java/
│ └── org/
│ └── jsoup/
│ ├── JsoupTest.java
│ ├── MultiLocaleExtension.java
│ ├── SerializationExceptionTest.java
│ ├── TextUtil.java
│ ├── helper/
│ │ ├── AuthenticationHandlerTest.java
│ │ ├── CookieUtilTest.java
│ │ ├── DataUtilTest.java
│ │ ├── HttpConnectionTest.java
│ │ ├── RegexTest.java
│ │ ├── ValidateTest.java
│ │ └── W3CDomTest.java
│ ├── integration/
│ │ ├── Benchmark.java
│ │ ├── ConnectIT.java
│ │ ├── ConnectTest.java
│ │ ├── FuzzFixesIT.java
│ │ ├── FuzzFixesTest.java
│ │ ├── ParseTest.java
│ │ ├── ProxyTest.java
│ │ ├── SafelistExtensionTest.java
│ │ ├── SessionIT.java
│ │ ├── SessionTest.java
│ │ ├── TestServer.java
│ │ └── servlets/
│ │ ├── AuthFilter.java
│ │ ├── BaseServlet.java
│ │ ├── CookieServlet.java
│ │ ├── DeflateServlet.java
│ │ ├── EchoServlet.java
│ │ ├── FileServlet.java
│ │ ├── HelloServlet.java
│ │ ├── InterruptedServlet.java
│ │ ├── ProxyServlet.java
│ │ ├── RedirectServlet.java
│ │ └── SlowRider.java
│ ├── internal/
│ │ ├── ControllableInputStreamTest.java
│ │ ├── QuietAppendableTest.java
│ │ ├── ReaderTest.java
│ │ ├── SoftPoolTest.java
│ │ └── StringUtilTest.java
│ ├── nodes/
│ │ ├── AttributeTest.java
│ │ ├── AttributesTest.java
│ │ ├── BuildEntities.java
│ │ ├── CommentTest.java
│ │ ├── DataNodeTest.java
│ │ ├── DocumentTest.java
│ │ ├── DocumentTypeTest.java
│ │ ├── ElementIT.java
│ │ ├── ElementTest.java
│ │ ├── EntitiesTest.java
│ │ ├── FormElementTest.java
│ │ ├── LeafNodeTest.java
│ │ ├── NodeIteratorTest.java
│ │ ├── NodeStreamTest.java
│ │ ├── NodeTest.java
│ │ ├── PrinterTest.java
│ │ └── TextNodeTest.java
│ ├── parser/
│ │ ├── AttributeParseTest.java
│ │ ├── CharacterReaderTest.java
│ │ ├── HtmlParserTest.java
│ │ ├── HtmlTreeBuilderStateTest.java
│ │ ├── HtmlTreeBuilderTest.java
│ │ ├── ParserIT.java
│ │ ├── ParserSettingsTest.java
│ │ ├── ParserTest.java
│ │ ├── PositionTest.java
│ │ ├── StreamParserTest.java
│ │ ├── TagSetTest.java
│ │ ├── TagTest.java
│ │ ├── TokenQueueTest.java
│ │ ├── TokeniserStateTest.java
│ │ ├── TokeniserTest.java
│ │ └── XmlTreeBuilderTest.java
│ ├── safety/
│ │ ├── CleanerTest.java
│ │ └── SafelistTest.java
│ └── select/
│ ├── CssTest.java
│ ├── ElementsTest.java
│ ├── EvaluatorDebug.java
│ ├── EvaluatorTest.java
│ ├── NodesTest.java
│ ├── QueryParserTest.java
│ ├── SelectorIT.java
│ ├── SelectorTest.java
│ ├── StructuralEvaluatorTest.java
│ ├── TraversorTest.java
│ └── XpathTest.java
├── java11/
│ └── org/
│ └── jsoup/
│ ├── helper/
│ │ ├── HttpClientExecutorTest.java
│ │ └── HttpClientTestAccess.java
│ └── integration/
│ ├── HttpClientConnectIT.java
│ ├── HttpClientConnectTest.java
│ ├── HttpClientSessionIT.java
│ └── HttpClientSessionTest.java
└── resources/
├── bomtests/
│ ├── bom_utf16be.html
│ ├── bom_utf16le.html
│ ├── bom_utf32be.html
│ ├── bom_utf32le.html
│ └── bom_utf8.html
├── fuzztests/
│ ├── ex-inselect16.html
│ └── garble.html
├── htmltests/
│ ├── README
│ ├── adopt-1.html
│ ├── basehref.html
│ ├── charset-base.html
│ ├── comments.html
│ ├── escapes-across-buffer.html
│ ├── form-tests.html
│ ├── gzip.html
│ ├── gzip.html.z
│ ├── large.html
│ ├── lowercase-charset-test.html
│ ├── medium.html
│ ├── meta-charset-1.html
│ ├── meta-charset-2.html
│ ├── meta-charset-3.html
│ ├── namespaces.xhtml
│ ├── table-invalid-elements.html
│ ├── table-polymer-template.html
│ ├── test-rss.xml
│ ├── upload-form.html
│ ├── xml-charset.xml
│ └── xml-test.xml
├── local-cert/
│ ├── README.md
│ ├── cert.conf
│ ├── server.crt
│ ├── server.key
│ ├── server.p12
│ └── server.pfx
└── printertests/
├── input-1.html
├── outline-1.html
├── passthru-1.html
└── pretty-1.html
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
* text=auto eol=lf
================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
- package-ecosystem: maven
directory: /
schedule:
interval: weekly
cooldown:
default-days: 12
ignore:
# Jetty 9.x needed for JDK8 compatibility; it still receives security updates. Only used in tests.
- dependency-name: "org.eclipse.jetty:jetty-server"
update-types: ["version-update:semver-major"]
- dependency-name: "org.eclipse.jetty:jetty-servlet"
update-types: ["version-update:semver-major"]
# Et tu, junit? Keep us on 5, as 6 has min JDK17 - https://docs.junit.org/6.0.0-RC3/release-notes/#release-notes-6.0.0-M1
- dependency-name: "org.junit.jupiter:junit-jupiter"
update-types: ["version-update:semver-major"]
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
cooldown:
default-days: 12
================================================
FILE: .github/workflows/build.yml
================================================
name: Build
on:
push:
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
# choosing to run a reduced set of LTS, current, and next, to balance coverage and execution time
java: [8, 17, 25]
fail-fast: false
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
cache: 'maven'
- name: Maven Compile
run: mvn -X compile -B --file pom.xml
- name: Maven Verify
run: mvn -X verify -B --file pom.xml
...
================================================
FILE: .github/workflows/cifuzz.yml
================================================
name: CIFuzz
on: [pull_request]
jobs:
Fuzzing:
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'jsoup'
dry-run: false
language: jvm
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'jsoup'
fuzz-seconds: 600
dry-run: false
language: jvm
- name: Upload Crash
uses: actions/upload-artifact@v7
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
path: ./out/artifacts
================================================
FILE: .github/workflows/codeql.yml
================================================
name: CodeQL
on:
push:
branches:
- master
pull_request:
jobs:
codeql:
runs-on: ubuntu-latest
name: "CodeQL"
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- name: CodeQL Initialization
uses: github/codeql-action/init@v4
with:
languages: java
queries: +security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@v4
- name: CodeQL Analysis
uses: github/codeql-action/analyze@v4
================================================
FILE: .gitignore
================================================
.idea/
jsoup.iml
jsoup.ipr
jsoup.iws
target/
.classpath
.project
.settings/
*Thrash*
bin/
.vscode/
.java-version
.DS_Store
================================================
FILE: CHANGES.md
================================================
# jsoup Changelog
## 1.22.2 (PENDING)
### Improvements
* Expanded and clarified `NodeTraversor` support for in-place DOM rewrites during `NodeVisitor.head()`. Current-node edits such as `remove`, `replace`, and `unwrap` now recover more predictably, while traversal stays within the original root subtree. This makes single-pass tree cleanup and normalization visitors easier to write, for example when unwrapping presentational elements or replacing text nodes as you walk the DOM. [#2472](https://github.com/jhy/jsoup/issues/2472)
* Documentation: clarified that a configured `Cleaner` may be reused across concurrent threads, and that shared `Safelist` instances should not be mutated while in use. [#2473](https://github.com/jhy/jsoup/issues/2473)
### Bug Fixes
* Android (R8/ProGuard): added a rule to ignore the optional `re2j` dependency when not present. [#2459](https://github.com/jhy/jsoup/issues/2459)
* Fixed a `NodeTraversor` regression in 1.21.2 where removing or replacing the current node during `head()` could revisit the replacement node and loop indefinitely. The traversal docs now also clarify which inserted nodes are visited in the current pass. [#2472](https://github.com/jhy/jsoup/issues/2472)
* Parsing during charset sniffing no longer fails if an advisory `available()` call throws `IOException`, as seen on JDK 8 `HttpURLConnection`. [#2474](https://github.com/jhy/jsoup/issues/2474)
* `Cleaner` no longer makes relative URL attributes in the input document absolute when cleaning or validating a `Document`. URL normalization now applies only to the cleaned output, and `Safelist.isSafeAttribute()` is side effect free. [#2475](https://github.com/jhy/jsoup/issues/2475)
* `Cleaner` no longer duplicates enforced attributes when the input `Document` preserves attribute case. A case-variant source attribute is now replaced by the enforced attribute in the cleaned output. [#2476](https://github.com/jhy/jsoup/issues/2476)
* If a per-request SOCKS proxy is configured, jsoup now avoids using the JDK `HttpClient`, because the JDK would silently ignore that proxy and attempt to connect directly. Those requests now fall back to the legacy `HttpURLConnection` transport instead, which does support SOCKS. [#2468](https://github.com/jhy/jsoup/issues/2468)
## 1.22.1 (2026-Jan-01)
### Improvements
* Added support for using the `re2j` regular expression engine for regex-based CSS selectors (e.g. `[attr~=regex]`, `:matches(regex)`), which ensures linear-time performance for regex evaluation. This allows safer handling of arbitrary user-supplied query regexes. To enable, add the `com.google.re2j` dependency to your classpath, e.g.:
```xml
<dependency>
<groupId>com.google.re2j</groupId>
<artifactId>re2j</artifactId>
<version>1.8</version>
</dependency>
```
(If you already have that dependency in your classpath, but you want to keep using the Java regex engine, you can disable re2j via `System.setProperty("jsoup.useRe2j", "false")`.) You can confirm that the re2j engine has been enabled correctly by calling `org.jsoup.helper.Regex.usingRe2j()`. [#2407](https://github.com/jhy/jsoup/pull/2407)
* Added an instance method `Parser#unescape(String, boolean)` that unescapes HTML entities using the parser's configuration (e.g. to support error tracking), complementing the existing static utility `Parser.unescapeEntities(String, boolean)`. [#2396](https://github.com/jhy/jsoup/pull/2396)
* Added a configurable maximum parser depth (to limit the number of open elements on stack) to both HTML and XML parsers. The HTML parser now defaults to a depth of 512 to match browser behavior, and protect against unbounded stack growth, while the XML parser keeps unlimited depth by default, but can opt into a limit via `org.jsoup.parser.Parser#setMaxDepth`. [#2421](https://github.com/jhy/jsoup/issues/2421)
* Build: added CI coverage for JDK 25 [#2403](https://github.com/jhy/jsoup/pull/2403)
* Build: added a CI fuzzer for contextual fragment parsing (in addition to existing full body HTML and XML fuzzers). [oss-fuzz #14041](https://github.com/google/oss-fuzz/pull/14041)
### Changes
* Set a removal schedule of jsoup 1.24.1 for previously deprecated APIs.
### Bug Fixes
* Previously cached child `Elements` of an `Element` were not correctly invalidated in `Node#replaceWith(Node)`, which could lead to incorrect results when subsequently calling `Element#children()`. [#2391](https://github.com/jhy/jsoup/issues/2391)
* Attribute selector values are now compared literally without trimming. Previously, jsoup trimmed whitespace from selector values and from element attribute values, which could cause mismatches with browser behavior (e.g. `[attr=" foo "]`). Now matches align with the CSS specification and browser engines. [#2380](https://github.com/jhy/jsoup/issues/2380)
* When using the JDK HttpClient, any system default proxy (`ProxySelector.getDefault()`) was ignored. Now, the system proxy is used if a per-request proxy is not set. [#2388](https://github.com/jhy/jsoup/issues/2388), [#2390](https://github.com/jhy/jsoup/pull/2390)
* A `ValidationException` could be thrown in the adoption agency algorithm with particularly broken input. Now logged as a parse error. [#2393](https://github.com/jhy/jsoup/issues/2393)
* Null characters in the HTML body were not consistently removed; and in foreign content were not correctly replaced. [#2395](https://github.com/jhy/jsoup/issues/2395)
* An `IndexOutOfBoundsException` could be thrown when parsing a body fragment with crafted input. Now logged as a parse error. [#2397](https://github.com/jhy/jsoup/issues/2397), [#2406](https://github.com/jhy/jsoup/issues/2406)
* When using StructuralEvaluators (e.g., a `parent child` selector) across many retained threads, their memoized results could also be retained, increasing memory use. These results are now cleared immediately after use, reducing overall memory consumption. [#2411](https://github.com/jhy/jsoup/issues/2411)
* Cloning a `Parser` now preserves any custom `TagSet` applied to the parser. [#2422](https://github.com/jhy/jsoup/issues/2422), [#2423](https://github.com/jhy/jsoup/pull/2423)
* Custom tags marked as `Tag.Void` now parse and serialize like the built-in void elements: they no longer consume following content, and the XML serializer emits the expected self-closing form. [#2425](https://github.com/jhy/jsoup/issues/2425)
* The `<br>` element is once again classified as an inline tag (`Tag.isBlock() == false`), matching common developer expectations and its role as phrasing content in HTML, while pretty-printing and text extraction continue to treat it as a line break in the rendered output. [#2387](https://github.com/jhy/jsoup/issues/2387), [#2439](https://github.com/jhy/jsoup/issues/2439)
* Fixed an intermittent truncation issue when fetching and parsing remote documents via `Jsoup.connect(url).get()`. On responses without a charset header, the initial charset sniff could sometimes (depending on buffering / `available()` behavior) be mistaken for end-of-stream and a partial parse reused, dropping trailing content. [#2448](https://github.com/jhy/jsoup/issues/2448)
* `TagSet` copies no longer mutate their template during lazy lookups, preventing cross-thread `ConcurrentModificationException` when parsing with shared sessions. [#2453](https://github.com/jhy/jsoup/pull/2453)
* Fixed parsing of `<svg>` `foreignObject` content nested within a `<p>`, which could incorrectly move the HTML subtree outside the SVG. [#2452](https://github.com/jhy/jsoup/issues/2452)
### Internal Changes
* Deprecated internal helper `org.jsoup.internal.Functions` (for removal in v1.23.1). This was previously used to support older Android API levels without full `java.util.function` coverage; jsoup now requires core library desugaring so this indirection is no longer necessary. [#2412](https://github.com/jhy/jsoup/pull/2412)
## 1.21.2 (2025-Aug-25)
### Changes
* Deprecated internal (yet visible) methods `Normalizer#normalize(String, bool)` and `Attribute#shouldCollapseAttribute(Document.OutputSettings)`. These will be removed in a future version.
* Deprecated `Connection#sslSocketFactory(SSLSocketFactory)` in favor of the new `Connection#sslContext(SSLContext)`. Using `sslSocketFactory` will force the use of the legacy `HttpUrlConnection` implementation, which does not support HTTP/2. [#2370](https://github.com/jhy/jsoup/pull/2370)
### Improvements
* When pretty-printing, if there are consecutive text nodes (via DOM manipulation), the non-significant whitespace between them will be collapsed. [#2349](https://github.com/jhy/jsoup/pull/2349).
* Updated `Connection.Response#statusMessage()` to return a simple loggable string message (e.g. "OK") when using the `HttpClient` implementation, which doesn't otherwise return any server-set status message. [#2356](https://github.com/jhy/jsoup/issues/2346)
* `Attributes#size()` and `Attributes#isEmpty()` now exclude any internal attributes (such as user data) from their count. This aligns with the attributes' serialized output and iterator. [#2369](https://github.com/jhy/jsoup/pull/2369)
* Added `Connection#sslContext(SSLContext)` to provide a custom SSL (TLS) context to requests, supporting both the `HttpClient` and the legacy `HttUrlConnection` implementations. [#2370](https://github.com/jhy/jsoup/pull/2370)
* Performance optimizations for DOM manipulation methods including when repeatedly removing an element's first child (`element.child(0).remove()`, and when using `Parser#parseBodyFragement()` to parse a large number of direct children. [#2373](https://github.com/jhy/jsoup/pull/2373).
### Bug Fixes
* When parsing from an InputStream and a multibyte character happened to straddle a buffer boundary, the stream would not be completely read. [#2353](https://github.com/jhy/jsoup/issues/2353).
* In `NodeTraversor`, if a last child element was removed during the `head()` call, the parent would be visited twice. [#2355](https://github.com/jhy/jsoup/issues/2355).
* Cloning an Element that has an Attributes object would add an empty internal user-data attribute to that clone, which would cause unexpected results for `Attributes#size()` and `Attributes#isEmpty()`. [#2356](https://github.com/jhy/jsoup/issues/2356)
* In a multithreaded application where multiple threads are calling `Element#children()` on the same element concurrently, a race condition could happen when the method was generating the internal child element cache (a filtered view of its child nodes). Since concurrent reads of DOM objects should be threadsafe without external synchronization, this method has been updated to execute atomically. [#2366](https://github.com/jhy/jsoup/issues/2366)
* When parsing HTML with svg:script elements in SVG elements, don't enter the Text insertion mode, but continue to parse as foreign content. Otherwise, misnested HTML could then cause an IndexOutOfBoundsException. [#2374](https://github.com/jhy/jsoup/issues/2374)
* Malformed HTML could throw an IndexOutOfBoundsException during the adoption agency. [#2377](https://github.com/jhy/jsoup/pull/2377).
## 1.21.1 (2025-Jun-23)
### Changes
* Removed previously deprecated methods. [#2317](https://github.com/jhy/jsoup/pull/2317)
* Deprecated the `:matchText` pseduo-selector due to its side effects on the DOM; use the new `::textnode` selector and the `Element#selectNodes(String css, Class type)` method instead. [#2343](https://github.com/jhy/jsoup/pull/2343)
* Deprecated `Connection.Response#bufferUp()` in lieu of `Connection.Response#readFully()` which can throw a checked IOException.
* Deprecated internal methods `Validate#ensureNotNull` (replaced by typed `Validate#expectNotNull`); protected HTML appenders from Attribute and Node.
* If you happen to be using any of the deprecated methods, please take the opportunity now to migrate away from them, as they will be removed in a future release.
### Improvements
* Enhanced the `Selector` to support direct matching against nodes such as comments and text nodes. For example, you can now find an element that follows a specific comment: `::comment:contains(prices) + p` will select `p` elements immediately after a `<!-- prices: -->` comment. Supported types include `::node`, `::leafnode`, `::comment`, `::text`, `::data`, and `::cdata`. Node contextual selectors like `::node:contains(text)`, `:matches(regex)`, and `:blank` are also supported. Introduced `Element#selectNodes(String css)` and `Element#selectNodes(String css, Class nodeType)` for direct node selection. [#2324](https://github.com/jhy/jsoup/pull/2324)
* Added `TagSet#onNewTag(Consumer<Tag> customizer)`: register a callback that’s invoked for each new or cloned Tag when it’s inserted into the set. Enables dynamic tweaks of tag options (for example, marking all custom tags as self-closing, or everything in a given namespace as preserving whitespace).
* Made `TokenQueue` and `CharacterReader` autocloseable, to ensure that they will release their buffers back to the buffer pool, for later reuse.
* Added `Selector#evaluatorOf(String css)`, as a clearer way to obtain an Evaluator from a CSS query. An alias of `QueryParser.parse(String css)`.
* Custom tags (defined via the `TagSet`) in a foreign namespace (e.g. SVG) can be configured to parse as data tags.
* Added `NodeVisitor#traverse(Node)` to simplify node traversal calls (vs. importing `NodeTraversor`).
* Updated the default user-agent string to improve compatibility. [#2341](https://github.com/jhy/jsoup/issues/2341)
* The HTML parser now allows the specific text-data type (Data, RcData) to be customized for known tags. (Previously, that was only supported on custom tags.) [#2326](https://github.com/jhy/jsoup/issues/2326).
* Added `Connection#readFully()` as a replacement for `Connection#bufferUp()` with an explicit IOException. Similarly, added `Connection#readBody()` over `Connection#body()`. Deprecated `Connection#bufferUp()`. [#2327](https://github.com/jhy/jsoup/pull/2327)
* When serializing HTML, the `<` and `>` characters are now escaped in attributes. This helps prevent a class of mutation XSS attacks. [#2337](https://github.com/jhy/jsoup/pull/2337)
* Changed `Connection` to prefer using the JDK's HttpClient over HttpUrlConnection, if available, to enable HTTP/2 support by default. Users can disable via `-Djsoup.useHttpClient=false`. [#2340](https://github.com/jhy/jsoup/pull/2340)
### Bug Fixes
* The contents of a `script` in a `svg` foreign context should be parsed as script data, not text. [#2320](https://github.com/jhy/jsoup/issues/2320)
* `Tag#isFormSubmittable()` was updating the Tag's options. [#2323](https://github.com/jhy/jsoup/issues/2323)
* The HTML pretty-printer would incorrectly trim whitespace when text followed an inline element in a block element. [#2325](https://github.com/jhy/jsoup/issues/2325)
* Custom tags with hyphens or other non-letter characters in their names now work correctly as Data or RcData tags. Their closing tags are now tokenized properly. [#2332](https://github.com/jhy/jsoup/issues/2332)
* When cloning an Element, the clone would retain the source's cached child Element list (if any), which could lead to incorrect results when modifying the clone's child elements. [#2334](https://github.com/jhy/jsoup/issues/2334)
## 1.20.1 (2025-Apr-29)
### Changes
* To better follow the HTML5 spec and current browsers, the HTML parser no longer allows self-closing tags (`<foo />`)
to close HTML elements by default. Foreign content (SVG, MathML), and content parsed with the XML parser, still
supports self-closing tags. If you need specific HTML tags to support self-closing, you can register a custom tag via
the `TagSet` configured in `Parser.tagSet()`, using `Tag#set(Tag.SelfClose)`. Standard void tags (such as `<img>`,
`<br>`, etc.) continue to behave as usual and are not affected by this
change. [#2300](https://github.com/jhy/jsoup/issues/2300).
* The following internal components have been **deprecated**. If you do happen to be using any of these, please take the opportunity now to migrate away from them, as they will be removed in jsoup 1.21.1.
* `ChangeNotifyingArrayList`, `Document.updateMetaCharsetElement()`, `Document.updateMetaCharsetElement(boolean)`, `HtmlTreeBuilder.isContentForTagData(String)`, `Parser.isContentForTagData(String)`, `Parser.setTreeBuilder(TreeBuilder)`, `Tag.formatAsBlock()`, `Tag.isFormListed()`, `TokenQueue.addFirst(String)`, `TokenQueue.chompTo(String)`, `TokenQueue.chompToIgnoreCase(String)`, `TokenQueue.consumeToIgnoreCase(String)`, `TokenQueue.consumeWord()`, `TokenQueue.matchesAny(String...)`
### Functional Improvements
* Rebuilt the HTML pretty-printer, to simplify and consolidate the implementation, improve consistency, support custom
Tags, and provide a cleaner path for ongoing improvements. The specific HTML produced by the pretty-printer may be
different from previous versions. [#2286](https://github.com/jhy/jsoup/issues/2286).
* Added the ability to define custom tags, and to modify properties of known tags, via the `TagSet` tag collection.
Their properties can impact both the parse and how content is
serialized (output as HTML or XML). [#2285](https://github.com/jhy/jsoup/issues/2285).
* `Element.cssSelector()` will prefer to return shorter selectors by using ancestor IDs when available and unique. E.g.
`#id > div > p` instead of `html > body > div > div > p` [#2283](https://github.com/jhy/jsoup/pull/2283).
* Added `Elements.deselect(int index)`, `Elements.deselect(Object o)`, and `Elements.deselectAll()` methods to remove
elements from the `Elements` list without removing them from the underlying DOM. Also added `Elements.asList()` method
to get a modifiable list of elements without affecting the DOM. (Individual Elements remain linked to the
DOM.) [#2100](https://github.com/jhy/jsoup/issues/2100).
* Added support for sending a request body from an InputStream with
`Connection.requestBodyStream(InputStream stream)`. [#1122](https://github.com/jhy/jsoup/issues/1122).
* The XML parser now supports scoped xmlns: prefix namespace declarations, and applies the correct namespace to Tags and
Attributes. Also, added `Tag#prefix()`, `Tag#localName()`, `Attribute#prefix()`, `Attribute#localName()`, and
`Attribute#namespace()` to retrieve these. [#2299](https://github.com/jhy/jsoup/issues/2299).
* CSS identifiers are now escaped and unescaped correctly to the CSS spec. `Element#cssSelector()` will emit
appropriately escaped selectors, and the QueryParser supports those. Added `Selector.escapeCssIdentifier()` and
`Selector.unescapeCssIdentifier()`. [#2297](https://github.com/jhy/jsoup/pull/2297), [#2305](https://github.com/jhy/jsoup/pull/2305)
### Structure and Performance Improvements
* Refactored the CSS `QueryParser` into a clearer recursive descent
parser. [#2310](https://github.com/jhy/jsoup/pull/2310).
* CSS selectors with consecutive combinators (e.g. `div >> p`) will throw an explicit parse
exception. [#2311](https://github.com/jhy/jsoup/pull/2311).
* Performance: reduced the shallow size of an Element from 40 to 32 bytes, and the NodeList from 32 to 24.
[#2307](https://github.com/jhy/jsoup/pull/2307).
* Performance: reduced GC load of new StringBuilders when tokenizing input
HTML. [#2304](https://github.com/jhy/jsoup/pull/2304).
* Made `Parser` instances threadsafe, so that inadvertent use of the same instance across threads will not lead to
errors. For actual concurrency, use `Parser#newInstance()` per
thread. [#2314](https://github.com/jhy/jsoup/pull/2314).
### Bug Fixes
* Element names containing characters invalid in XML are now normalized to valid XML names when
serializing. [#1496](https://github.com/jhy/jsoup/issues/1496).
* When serializing to XML, characters that are invalid in XML 1.0 should be removed (not
encoded). [#1743](https://github.com/jhy/jsoup/issues/1743).
* When converting a `Document` to the W3C DOM in `W3CDom`, elements with an attribute in an undeclared namespace now
get a declaration of `xmlns:prefix="undefined"`. This allows subsequent serialization to XML via `W3CDom.asString()`
to succeed. [#2087](https://github.com/jhy/jsoup/issues/2087).
* The `StreamParser` could emit the final elements of a document twice, due to how `onNodeCompleted` was fired when closing out the stack. [#2295](https://github.com/jhy/jsoup/issues/2295).
* When parsing with the XML parser and error tracking enabled, the trailing `?` in `<?xml version="1.0"?>` would
incorrectly emit an error. [#2298](https://github.com/jhy/jsoup/issues/2298).
* Calling `Element#cssSelector()` on an element with combining characters in the class or ID now produces the correct output. [#1984](https://github.com/jhy/jsoup/issues/1984).
## 1.19.1 (2025-Mar-04)
### Changes
* Added support for **http/2** requests in `Jsoup.connect()`, when running on Java 11+, via the Java HttpClient
implementation. [#2257](https://github.com/jhy/jsoup/pull/2257).
* In this version of jsoup, the default is to make requests via the HttpUrlConnection implementation: use
**`System.setProperty("jsoup.useHttpClient", "true");`** to enable making requests via the HttpClient instead ,
which will enable http/2 support, if available. This will become the default in a later version of jsoup, so now is
a good time to validate it.
* If you are repackaging the jsoup jar in your deployment (i.e. creating a shaded- or a fat-jar), make sure to specify
that as a Multi-Release
JAR.
* If the `HttpClient` impl is not available in your JRE, requests will continue to be made via
`HttpURLConnection` (in `http/1.1` mode).
* Updated the minimum Android API Level validation from 10 to **21**. As with previous jsoup versions, Android
developers need to enable core library desugaring. The minimum Java version remains Java 8.
[#2173](https://github.com/jhy/jsoup/pull/2173)
* Removed previously deprecated class: `org.jsoup.UncheckedIOException` (replace with `java.io.UncheckedIOException`);
moved previously deprecated method `Element Element#forEach(Consumer)` to
`void Element#forEach(Consumer())`. [#2246](https://github.com/jhy/jsoup/pull/2246)
* Deprecated the methods `Document#updateMetaCharsetElement(boolean)` and `Document#updateMetaCharsetElement()`, as the
setting had no effect. When `Document#charset(Charset)` is called, the document's meta charset or XML encoding
instruction is always set. [#2247](https://github.com/jhy/jsoup/pull/2247)
### Improvements
* When cleaning HTML with a `Safelist` that preserves relative links, the `isValid()` method will now consider these
links valid. Additionally, the enforced attribute `rel=nofollow` will only be added to external links when configured
in the safelist. [#2245](https://github.com/jhy/jsoup/pull/2245)
* Added `Element#selectStream(String query)` and `Element#selectStream(Evaluator)` methods, that return a `Stream` of
matching elements. Elements are evaluated and returned as they are found, and the stream can be
terminated early. [#2092](https://github.com/jhy/jsoup/pull/2092)
* `Element` objects now implement `Iterable`, enabling them to be used in enhanced for loops.
* Added support for fragment parsing from a `Reader` via
`Parser#parseFragmentInput(Reader, Element, String)`. [#1177](https://github.com/jhy/jsoup/issues/1177)
* Reintroduced CLI executable examples, in `jsoup-examples.jar`. [#1702](https://github.com/jhy/jsoup/issues/1702)
* Optimized performance of selectors like `#id .class` (and other similar descendant queries) by around 4.6x, by better
balancing the Ancestor evaluator's cost function in the query
planner. [#2254](https://github.com/jhy/jsoup/issues/2254)
* Removed the legacy parsing rules for `<isindex>` tags, which would autovivify a `form` element with labels. This is no
longer in the spec.
* Added `Elements.selectFirst(String cssQuery)` and `Elements.expectFirst(String cssQuery)`, to select the first
matching element from an `Elements` list. [#2263](https://github.com/jhy/jsoup/pull/2263/)
* When parsing with the XML parser, XML Declarations and Processing Instructions are directly handled, vs bouncing
through the HTML parser's bogus comment handler. Serialization for non-doctype declarations no longer end with a
spurious `!`. [#2275](https://github.com/jhy/jsoup/pull/2275)
* When converting parsed HTML to XML or the W3C DOM, element names containing `<` are normalized to `_` to ensure valid
XML. For example, `<foo<bar>` becomes `<foo_bar>`, as XML does not allow `<` in element names, but HTML5
does. [#2276](https://github.com/jhy/jsoup/pull/2276)
* Reimplemented the HTML5 Adoption Agency Algorithm to the current spec. This handles mis-nested formating / structural elements. [#2278](https://github.com/jhy/jsoup/pull/2278)
### Bug Fixes
* If an element has an `;` in an attribute name, it could not be converted to a W3C DOM element, and so subsequent XPath
queries could miss that element. Now, the attribute name is more completely
normalized. [#2244](https://github.com/jhy/jsoup/issues/2244)
* For backwards compatibility, reverted the internal attribute key for doctype names to
"name". [#2241](https://github.com/jhy/jsoup/issues/2241)
* In `Connection`, skip cookies that have no name, rather than throwing a validation
exception. [#2242](https://github.com/jhy/jsoup/issues/2242)
* When running on JDK 1.8, the error `java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;`
could be thrown when calling `Response#body()` after parsing from a URL and the buffer size was
exceeded. [#2250](https://github.com/jhy/jsoup/pull/2250)
* For backwards compatibility, allow `null` InputStream inputs to `Jsoup.parse(InputStream stream, ...)`, by returning
an empty `Document`. [#2252](https://github.com/jhy/jsoup/issues/2252)
* A `template` tag containing an `li` within an open `li` would be parsed incorrectly, as it was not recognized as a
"special" tag (which have additional processing rules). Also, added the SVG and MathML namespace tags to the list of
special tags. [#2258](https://github.com/jhy/jsoup/issues/2258)
* A `template` tag containing a `button` within an open `button` would be parsed incorrectly, as the "in button scope"
check was not aware of the `template` element. Corrected other instances including MathML and SVG elements,
also. [#2271](https://github.com/jhy/jsoup/issues/2271)
* An `:nth-child` selector with a negative digit-less step, such as `:nth-child(-n+2)`, would be parsed incorrectly as a
positive step, and so would not match as expected. [#1147](https://github.com/jhy/jsoup/issues/1147)
* Calling `doc.charset(charset)` on an empty XML document would throw an
`IndexOutOfBoundsException`. [#2266](https://github.com/jhy/jsoup/issues/2266)
* Fixed a memory leak when reusing a nested `StructuralEvaluator` (e.g., a selector ancestor chain like `A B C`) by
ensuring cache reset calls cascade to inner members. [#2277](https://github.com/jhy/jsoup/issues/2277)
* Concurrent calls to `doc.clone().append(html)` were not supported. When a document was cloned, its `Parser` was not cloned but was a shallow copy of the original parser. [#2281](https://github.com/jhy/jsoup/issues/2281)
## 1.18.3 (2024-Dec-02)
### Bug Fixes
* When serializing to XML, attribute names containing `-`, `.`, or digits were incorrectly marked as invalid and
removed. [2235](https://github.com/jhy/jsoup/issues/2235)
## 1.18.2 (2024-Nov-27)
### Improvements
* Optimized the throughput and memory use throughout the input read and parse flows, with heap allocations and GC
down between -6% and -89%, and throughput improved up to +143% for small inputs. Most inputs sizes will see
throughput increases of ~ 20%. These performance improvements come through recycling the backing `byte[]` and `char[]`
arrays used to read and parse the input. [2186](https://github.com/jhy/jsoup/pull/2186)
* Speed optimized `html()` and `Entities.escape()` when the input contains UTF characters in a supplementary plane, by
around 49%. [2183](https://github.com/jhy/jsoup/pull/2183)
* The form associated elements returned by `FormElement.elements()` now reflect changes made to the DOM,
subsequently to the original parse. [2140](https://github.com/jhy/jsoup/issues/2140)
* In the `TreeBuilder`, the `onNodeInserted()` and `onNodeClosed()` events are now also fired for the outermost /
root `Document` node. This enables source position tracking on the Document node (which was previously unset). And
it also enables the node traversor to see the outer Document node. [2182](https://github.com/jhy/jsoup/pull/2182)
* Selected Elements can now be position swapped inline using
`Elements#set()`. [2212](https://github.com/jhy/jsoup/issues/2212)
### Bug Fixes
* `Element.cssSelector()` would fail if the element's class contained a `*`
character. [2169](https://github.com/jhy/jsoup/issues/2169)
* When tracking source ranges, a text node following an invalid self-closing element may be left
untracked. [2175](https://github.com/jhy/jsoup/issues/2175)
* When a document has no doctype, or a doctype not named `html`, it should be parsed in Quirks
Mode. [2197](https://github.com/jhy/jsoup/issues/2197)
* With a selector like `div:has(span + a)`, the `has()` component was not working correctly, as the inner combining
query caused the evaluator to match those against the outer's siblings, not
children. [2187](https://github.com/jhy/jsoup/issues/2187)
* A selector query that included multiple `:has()` components in a nested `:has()` might incorrectly
execute. [2131](https://github.com/jhy/jsoup/issues/2131)
* When cookie names in a response are duplicated, the simple view of cookies available via
`Connection.Response#cookies()` will provide the last one set. Generally it is better to use
the [Jsoup.newSession](https://jsoup.org/cookbook/web/request-session) method to maintain a cookie jar, as that
applies appropriate path selection on cookies when making requests. [1831](https://github.com/jhy/jsoup/issues/1831)
* When parsing named HTML entities, base entities should resolve if they are a prefix of the input token (and not in an
attribute). [2207](https://github.com/jhy/jsoup/issues/2207)
* Fixed incorrect tracking of source ranges for attributes merged from late-occurring elements that were implicitly
created (`html` or `body`). [2204](https://github.com/jhy/jsoup/issues/2204)
* Follow the current HTML specification in the tokenizer to allow `<` as part of a tag name, instead of emitting it as a
character node. [2230](https://github.com/jhy/jsoup/issues/2230)
* Similarly, allow a `<` as the start of an attribute name, vs creating a new element. The previous behavior was
intended to parse closer to what we anticipated the author's intent to be, but that does not align to the spec or to
how browsers behave. [1483](https://github.com/jhy/jsoup/issues/1483)
## 1.18.1 (2024-Jul-10)
### Improvements
* **Stream Parser**: A `StreamParser` provides a progressive parse of its input. As each `Element` is completed, it is
emitted via a `Stream` or `Iterator` interface. Elements returned will be complete with all their children, and an
(empty) next sibling, if applicable. Elements (or their children) may be removed from the DOM during the parse,
for e.g. to conserve memory, providing a mechanism to parse an input document that would otherwise be too large to fit
into memory, yet still providing a DOM interface to the document and its elements. Additionally, the parser provides
a `selectFirst(String query)` / `selectNext(String query)`, which will run the parser until a hit is found, at which
point the parse is suspended. It can be resumed via another `select()` call, or via the `stream()` or `iterator()`
methods. [2096](https://github.com/jhy/jsoup/pull/2096)
* **Download Progress**: added a Response Progress event interface, which reports progress and URLs are downloaded (and
parsed). Supported on both a session and a single connection
level. [2164](https://github.com/jhy/jsoup/pull/2164), [656](https://github.com/jhy/jsoup/issues/656)
* Added `Path` accepting parse methods: `Jsoup.parse(Path)`, `Jsoup.parse(path, charsetName, baseUri, parser)`,
etc. [2055](https://github.com/jhy/jsoup/pull/2055)
* Updated the `button` tag configuration to include a space between multiple button elements in the `Element.text()`
method. [2105](https://github.com/jhy/jsoup/issues/2105)
* Added support for the `ns|*` all elements in namespace Selector. [1811](https://github.com/jhy/jsoup/issues/1811)
* When normalising attribute names during serialization, invalid characters are now replaced with `_`, vs being
stripped. This should make the process clearer, and generally prevent an invalid attribute name being coerced
unexpectedly. [2143](https://github.com/jhy/jsoup/issues/2143)
### Changes
* Removed previously deprecated internal classes and methods. [2094](https://github.com/jhy/jsoup/pull/2094)
* Build change: the built jar's OSGi manifest no longer imports itself. [2158](https://github.com/jhy/jsoup/issues/2158)
### Bug Fixes
* When tracking source positions, if the first node was a TextNode, its position was incorrectly set
to `-1.` [2106](https://github.com/jhy/jsoup/issues/2106)
* When connecting (or redirecting) to URLs with characters such as `{`, `}` in the path, a Malformed URL exception would
be thrown (if in development), or the URL might otherwise not be escaped correctly (if in
production). The URL encoding process has been improved to handle these characters
correctly. [2142](https://github.com/jhy/jsoup/issues/2142)
* When using `W3CDom` with a custom output Document, a Null Pointer Exception would be
thrown. [2114](https://github.com/jhy/jsoup/pull/2114)
* The `:has()` selector did not match correctly when using sibling combinators (like
e.g.: `h1:has(+h2)`). [2137](https://github.com/jhy/jsoup/issues/2137)
* The `:empty` selector incorrectly matched elements that started with a blank text node and were followed by
non-empty nodes, due to an incorrect short-circuit. [2130](https://github.com/jhy/jsoup/issues/2130)
* `Element.cssSelector()` would fail with "Did not find balanced marker" when building a selector for elements that had
a `(` or `[` in their class names. And selectors with those characters escaped would not match as
expected. [2146](https://github.com/jhy/jsoup/issues/2146)
* Updated `Entities.escape(string)` to make the escaped text suitable for both text nodes and attributes (previously was
only for text nodes). This does not impact the output of `Element.html()` which correctly applies a minimal escape
depending on if the use will be for text data or in a quoted
attribute. [1278](https://github.com/jhy/jsoup/issues/1278)
* Fuzz: a Stack Overflow exception could occur when resolving a crafted `<base href>` URL, in the normalizing regex.
[2165](https://github.com/jhy/jsoup/issues/2165)
---
## 1.17.2 (2023-Dec-29)
### Improvements
* **Attribute object accessors**: Added `Element.attribute(String)` and `Attributes.attribute(String)` to more simply
obtain an `Attribute` object. [2069](https://github.com/jhy/jsoup/issues/2069)
* **Attribute source tracking**: If source tracking is on, and an Attribute's key is changed (
via `Attribute.setKey(String)`), the source range is now still tracked
in `Attribute.sourceRange()`. [2070](https://github.com/jhy/jsoup/issues/2070)
* **Wildcard attribute selector**: Added support for the `[*]` element with any attribute selector. And also restored
support for selecting by an empty attribute name prefix (`[^]`). [2079](https://github.com/jhy/jsoup/issues/2079)
### Bug Fixes
* **Mixed-cased source position**: When tracking the source position of attributes, if the source attribute name was
mix-cased but the parser was lower-case normalizing attribute names, the source position for that attribute was not
tracked correctly. [2067](https://github.com/jhy/jsoup/issues/2067)
* **Source position NPE**: When tracking the source position of a body fragment parse, a null pointer
exception was thrown. [2068](https://github.com/jhy/jsoup/issues/2068)
* **Multi-point emoji entity**: A multi-point encoded emoji entity may be incorrectly decoded to the replacement
character. [2074](https://github.com/jhy/jsoup/issues/2074)
* **Selector sub-expressions**: (Regression) in a selector like `parent [attr=va], other`, the `, OR` was binding
to `[attr=va]` instead of `parent [attr=va]`, causing incorrect selections. The fix includes a EvaluatorDebug class
that generates a sexpr to represent the query, allowing simpler and more thorough query parse
tests. [2073](https://github.com/jhy/jsoup/issues/2073)
* **XML CData output**: When generating XML-syntax output from parsed HTML, script nodes containing (pseudo) CData
sections would have an extraneous CData section added, causing script execution errors. Now, the data content is
emitted in a HTML/XML/XHTML polyglot format, if the data is not already within a CData
section. [2078](https://github.com/jhy/jsoup/issues/2078)
* **Thread safety**: The `:has` evaluator held a non-thread-safe Iterator, and so if an Evaluator object was
shared across multiple concurrent threads, a NoSuchElement exception may be thrown, and the selected results may be
incorrect. Now, the iterator object is a thread-local. [2088](https://github.com/jhy/jsoup/issues/2088)
---
Older changes for versions 0.1.1 (2010-Jan-31) through 1.17.1 (2023-Nov-27) may be found in
[change-archive.txt](./change-archive.txt).
================================================
FILE: LICENSE
================================================
The MIT License
Copyright (c) 2009-2026 Jonathan Hedley <https://jsoup.org/>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# jsoup: Java HTML Parser
**jsoup** is a Java library that makes it easy to work with real-world HTML and XML. It offers an easy-to-use API for URL fetching, data parsing, extraction, and manipulation using DOM API methods, CSS, and xpath selectors.
**jsoup** implements the [WHATWG HTML5](https://html.spec.whatwg.org/multipage/) specification, and parses HTML to the same DOM as modern browsers.
* scrape and [parse](https://jsoup.org/cookbook/input/parse-document-from-string) HTML from a URL, file, or string
* find and [extract data](https://jsoup.org/cookbook/extracting-data/selector-syntax), using DOM traversal or CSS selectors
* manipulate the [HTML elements](https://jsoup.org/cookbook/modifying-data/set-html), attributes, and text
* [clean](https://jsoup.org/cookbook/cleaning-html/safelist-sanitizer) user-submitted content against a safe-list, to prevent XSS attacks
* output tidy HTML
jsoup is designed to deal with all varieties of HTML found in the wild; from pristine and validating, to invalid tag-soup; jsoup will create a sensible parse tree.
See [**jsoup.org**](https://jsoup.org/) for downloads and the full [API documentation](https://jsoup.org/apidocs/).
[](https://github.com/jhy/jsoup/actions?query=workflow%3ABuild)
## Example
Fetch the [Wikipedia](https://en.wikipedia.org/wiki/Main_Page) homepage, parse it to a [DOM](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction), and select the headlines from the *In the News* section into a list of [Elements](https://jsoup.org/apidocs/org/jsoup/select/Elements.html):
```java
Document doc = Jsoup.connect("https://en.wikipedia.org/").get();
log(doc.title());
Elements newsHeadlines = doc.select("#mp-itn b a");
for (Element headline : newsHeadlines) {
log("%s\n\t%s",
headline.attr("title"), headline.absUrl("href"));
}
```
[Online sample](https://try.jsoup.org/~LGB7rk_atM2roavV0d-czMt3J_g), [full source](https://github.com/jhy/jsoup/blob/master/src/main/java/org/jsoup/examples/Wikipedia.java).
## Open source
jsoup is an open source project distributed under the liberal [MIT license](https://jsoup.org/license). The source code is available on [GitHub](https://github.com/jhy/jsoup).
## Getting started
1. [Download](https://jsoup.org/download) the latest jsoup jar (or add it to your Maven/Gradle build)
2. Read the [cookbook](https://jsoup.org/cookbook/)
3. Enjoy!
### Android support
When used in Android projects, [core library desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring) with the [NIO specification](https://developer.android.com/studio/write/java11-nio-support-table) should be enabled to support Java 8+ features.
## Development and support
If you have any questions on how to use jsoup, or have ideas for future development, please get in touch via [jsoup Discussions](https://github.com/jhy/jsoup/discussions).
If you find any issues, please file a [bug](https://jsoup.org/bugs) after checking for duplicates.
The [colophon](https://jsoup.org/colophon) talks about the history of and tools used to build jsoup.
## Status
jsoup is in general, stable release.
## Author
jsoup was created and is maintained by [Jonathan Hedley](//jhedley.com), its primary author.
jsoup is an open-source project, and many contributors have helped improve it over the years. You can see their contributions and join the development on [GitHub](https://github.com/jhy/jsoup/graphs/contributors).
## Citing jsoup
If you use jsoup in research or technical documentation, you can cite it as:
> **Jonathan Hedley & jsoup contributors. jsoup: Java HTML Parser (2009–present).** Available at: https://jsoup.org
```plaintext
@misc{jsoup,
author = {Jonathan Hedley and jsoup contributors},
title = {jsoup: Java HTML Parser},
year = {2025},
url = {https://jsoup.org}
}
```
================================================
FILE: SECURITY.md
================================================
# Security Policy
## Supported Versions
Security fixes are not back-ported. Please make sure you are running at least the latest [release version](https://jsoup.org/download) of jsoup.
Please remember that jsoup is an Open Source library and is provided without any warranty. Before using jsoup in a critical environment, you should satisfy yourself that it works correctly and securely for your needs.
## Reporting a Vulnerability
If you believe or suspect you have identified a security vulnerability, please [report it](https://github.com/jhy/jsoup/security/advisories)
via the "Report a Vulnerability" button in Security Advisories.
([Details](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability))
We follow [Coordinated Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/about-coordinated-disclosure-of-security-vulnerabilities) practices and ask that you do too.
Please provide as much detail as possible in your report, including the steps to reproduce the vulnerability and sample code.
Alternatively to using GitHub, or if you have a security question, please email `security@jsoup.org`.
## Fixing Vulnerabilities
We take all vulnerability reports seriously and strive to fix them as quickly as possible. Once we receive a report, we will verify the vulnerability and its impact. We will then work to develop and test a fix for the vulnerability, and release it as soon as possible.
================================================
FILE: change-archive.txt
================================================
jsoup Changelog Archive
Contains change notes for versions 0.1.1 (2010-Jan-31) through 1.17.1 (2023-Nov-27).
More recent changes may be found in CHANGES.md.
Release 1.17.1 [27-Nov-2023]
* Improvement: in Jsoup.connect(), added support for request-level authentication, supporting authentication to
proxies and to servers.
<https://github.com/jhy/jsoup/pull/2046>
* Improvement: in the Elements list, added direct support for `#set(index, element)`, `#remove(index)`,
`#remove(object)`, `#clear()`, `#removeAll(collection)`, `#retainAll(collection)`, `#removeIf(filter)`,
`#replaceAll(operator)`. These methods update the original DOM, as well as the Elements list.
<https://github.com/jhy/jsoup/pull/2017>
* Improvement: added the NodeIterator class, to efficiently traverse a node tree using the Iterator interface. And
added Stream Element#stream() and Node#nodeStream() methods, to enable fluent composable stream pipelines of node
traversals.
<https://github.com/jhy/jsoup/pull/2051>
* Improvement: when changing the OutputSettings syntax to XML, the xhtml EscapeMode is automatically set by default.
* Improvement: added the `:is(selector list)` pseudo-selector, which finds elements that match any of the selectors in
the selector list. Useful for making large ORed selectors more readable.
* Improvement: repackaged the library with native (vs automatic) JPMS module support.
<https://github.com/jhy/jsoup/pull/2025>
* Improvement: better fidelity of source positions when tracking is enabled. And implicitly created or closed elements
are tracked and detectable via Range.isImplicit().
<https://github.com/jhy/jsoup/pull/2056>
* Improvement: when source tracking is enabled, the source position for attribute names and values is now available.
Attribute#sourceRange() provides the ranges.
<https://github.com/jhy/jsoup/pull/2057>
* Improvement: when running concurrently under Java 21+ Virtual Threads, virtual threads could be pinned to their
carrier platform thread when parsing an input stream. To improve performance, particularly when parsing fetched
URLs, the internal ConstrainableInputStream has been replaced by ControllableInputStream, which avoids the locking
which caused that pinning.
<https://github.com/jhy/jsoup/issues/2054>
* Improvement: in Jsoup.Connect, allow any XML mimetype as a supported mimetype. Was previously limited to
`{application|text}/xml`. This enables for e.g. fetching SVGs with a image/svg+xml mimetype, without having to
disable mimetype validation.
<https://github.com/jhy/jsoup/issues/2059>
* Bugfix: when outputting with XML syntax, HTML elements that were parsed as data nodes (<script> and <style>) should
be emitted as CDATA nodes, so that they can be parsed correctly by an XML parser.
<https://github.com/jhy/jsoup/pull/1720>
* Bugfix: the Immediate Parent selector `>` could match elements above the root context element, causing incorrect
elements to be returned when used on elements other than the root document.
<https://github.com/jhy/jsoup/issues/2018>
* Bugfix: in a sub-query such as `p:has(> span, > i)`, combinators following the `,` Or combinator would be
incorrectly skipped, such that the sub-query was parsed as `i` instead of `> i`.
<https://github.com/jhy/jsoup/issues/1707>
* Bugfix: in W3CDom, if the jsoup input document contained an empty doctype, the conversion would fail with a
DOMException. Now, said doctype is discarded, and the conversion continues.
* Bugfix: when cleaning a document containing SVG elements (or other foreign elements that have preserved case names),
the cleaned output would be incorrectly nested if the safelist had a different case than the input document.
<https://github.com/jhy/jsoup/issues/2049>
* Bugfix: when cleaning a document, the output style of unknown self-closing tags from the input was not preserved in
the output. (So a <foo /> in the input, if safe-listed, would be output as <foo></foo>.)
<https://github.com/jhy/jsoup/issues/2049>
* Build Improvement: added a local test proxy implementation, for proxy integration tests.
<https://github.com/jhy/jsoup/pull/2029>
* Build Improvement: added tests for HTTPS request support, using a local self-signed cert. Includes proxy tests.
<https://github.com/jhy/jsoup/pull/2032>
* Change: the InputStream returned in Connection.Response.bodyStream() is no longer a ConstrainedInputStream, and
so is not subject to settings such as timeout or maximum size. It is now a plain BufferedInputStream around the
response stream. Whilst this behaviour was not documented, you may have been inadvertently relying on those
constraints. The constraints are still applied to other methods such as .parse() and .bufferUp(). So if you do want
a constrained BufferedInputStream, you may do Connection.Response.bufferUp().bodyStream().
<https://github.com/jhy/jsoup/issues/2054>
Release 1.16.2 [20-Oct-2023]
* Improvement: optimized the performance of complex CSS selectors, by adding a cost-based query planner. Evaluators
are sorted by their relative execution cost, and executed in order of lower to higher cost. This speeds the
matching process by ensuring that simpler evaluations (such as a tag name match) are conducted prior to more
complex evaluations (such as an attribute regex, or a deep child scan with a :has).
* Improvement: added support for <svg> and <math> tags (and their children). This includes tag namespaces and case
preservation on applicable tags and attributes.
<https://github.com/jhy/jsoup/pull/2008>
* Improvement: when converting jsoup Documents to W3C Documents in W3CDom, HTML documents will be placed in the
`http://www.w3.org/1999/xhtml` namespace by default, per the HTML5 spec. This can be controlled by setting
`W3CDom#namespaceAware(false)`.
<https://github.com/jhy/jsoup/pull/1848>
* Improvement: speed optimized the Structural Evaluators by memoizing previous evaluations. Particularly the `~`
(any preceding sibling) and `:nth-of-type` selectors are improved.
<https://github.com/jhy/jsoup/issues/1956>
* Improvement: tweaked the performance of the Element nextElementSibling, previousElementSibling, firstElementSibling,
lastElementSibling, firstElementChild, and lastElementChild. They now inplace filter/skip in the child-node list, vs
having to allocate and scan a complete Element filtered list.
* Improvement: optimized internal methods that previously called Element.children() to use filter/skip child-node list
accessors instead, reducing new Element List allocations.
* Improvement: tweaked the performance of parsing :pseudo selectors.
* Improvement: when using the `:empty` pseudo-selector, blank textnodes are now considered empty. Previously,
an element containing any whitespace was not considered empty.
<https://github.com/jhy/jsoup/issues/1976>
* Improvement: in forms, <input type="image"> should be excluded from formData() (and hence from form submissions).
<https://github.com/jhy/jsoup/pull/2010>
* Improvement: in Safelist, made isSafeTag and isSafeAttribute public methods, for extensibility.
<https://github.com/jhy/jsoup/issues/1780>
* Bugfix: `form` elements and empty elements (such as `img`) did not have their attributes de-duplicated.
<https://github.com/jhy/jsoup/pull/1950>
* Bugfix: if Document.OutputSettings was cloned from a clone, an NPE would be thrown when used.
<https://github.com/jhy/jsoup/pull/1964>
* Bugfix: in Jsoup.connect(url), URL paths containing a %2B were incorrectly recoded to a '+', or a '+' was recoded
to a ' '. Fixed by reverting to the previous behavior of not encoding supplied paths, other than normalizing to
ASCII.
<https://github.com/jhy/jsoup/issues/1952>
* Bugfix: in Jsoup.connect(url), strings containing supplemental characters (e.g. emoji) were not URL escaped
correctly.
* Bugfix: in Jsoup.connect(url), the ConstrainableInputStream would clear Thread interrupts when reading the body.
This precluded callers from spawning a thread, running a number of requests for a length of time, then joining that
thread after interrupting it.
<https://github.com/jhy/jsoup/issues/1991>
* Bugfix: when tracking HTML source positions, the closing tags for H1...H6 elements were not tracked correctly.
<https://github.com/jhy/jsoup/issues/1987>
* Bugfix: in Jsoup.connect(), a DELETE method request did not support a request body.
<https://github.com/jhy/jsoup/issues/1972>
* Bugfix: when calling Element.cssSelector() on an extremely deeply nested element, a StackOverflowError could occur.
Further, a StackOverflowError may occur when running the query.
<https://github.com/jhy/jsoup/issues/2001>
* Bugfix: appending a node back to its original Element after empty() would throw an Index out of bounds exception.
Also, now the child nodes that were removed have their parent node cleared, fully detaching them from the original
parent.
<https://github.com/jhy/jsoup/issues/2013>
* Bugfix: in Jsoup.Connection when adding headers, the value may have been assumed to be an incorrectly decoded
ISO_8859_1 string, and re-encoded as UTF-8. The value is now left as-is.
* Change: removed previously deprecated methods Document#normalise, Element#forEach(org.jsoup.helper.Consumer<>),
Node#forEach(org.jsoup.helper.Consumer<>), and the org.jsoup.helper.Consumer interface; the latter being a
previously required compatibility shim prior to Android's de-sugaring support.
* Change: the previous compatibility shim org.jsoup.UncheckedIOException is deprecated in favor of the now supported
java.io.UncheckedIOException. If you are catching the former, modify your code to catch the latter instead.
<https://github.com/jhy/jsoup/pull/1989>
* Change: blocked noscript tags from being added to Safelists, due to incompatibilities between parsers with and
without script-mode enabled.
Release 1.16.1 [29-Apr-2023]
* Improvement: in Jsoup.connect(url), natively support URLs with Unicode characters in the path or query string,
without having to be escaped by the caller.
<https://github.com/jhy/jsoup/issues/1914>
* Improvement: Calling Node.remove() on a node with no parent is now a no-op, vs a validation error.
<https://github.com/jhy/jsoup/issues/1898>
* Bugfix: aligned the HTML Tree Builder processing steps for AfterBody and AfterAfterBody to the updated WHATWG
standard, to not pop the stack to close <body> or <html> elements. This prevents an errant </html> closing preceding
structure. Also added appropriate error message outputs in this case.
<https://github.com/jhy/jsoup/issues/1851>
* Bugfix: Corrected support for ruby elements (<ruby>, <rp>, <rt>, and <rtc>) to current spec.
<https://github.com/jhy/jsoup/issues/1294>
* Bugfix: When using Node.before(node) or Node.after(node), if the incoming node was a sibling of the context node,
the incoming node may be inserted into the wrong relative location.
<https://github.com/jhy/jsoup/issues/1898>
* Bugfix: In Jsoup.connect(url), if the input URL had components that were already % escaped, they would be escaped
again, causing errors when fetched.
<https://github.com/jhy/jsoup/issues/1902>
* Bugfix: when tracking input source positions, text in tables that was fostered had invalid positions.
<https://github.com/jhy/jsoup/issues/1927>
* Bugfix: If the Document.OutputSettings class was initialized, and then Entities.escape(String) called, an NPE may be
thrown due to a class loading circular dependency.
<https://github.com/jhy/jsoup/issues/1910>
* Bugfix: when pretty-printing, the first inline Element or Comment in a block would not be wrap-indented if it were
preceded by a blank text node.
<https://github.com/jhy/jsoup/issues/1906>
* Bugfix: when pretty-printing a <pre> containing block tags, those tags were incorrectly indented.
<https://github.com/jhy/jsoup/issues/1891>
* Bugfix: when pretty-printing nested inlineable blocks (such as a <p> in a <td>), the inner element should be
indented.
<https://github.com/jhy/jsoup/issues/1926>
* Bugfix: <br> tags should be wrap-indented when in block tags (and not when in inline tags).
<https://github.com/jhy/jsoup/issues/1911>
* Bugfix: the contents of a sufficiently large <textarea> with un-escaped HTML closing tags may be incorrectly parsed
to an empty node.
<https://github.com/jhy/jsoup/issues/1929>
Release 1.15.4 [18-Feb-2023]
* Improvement: added the ability to escape CSS selectors (tags, IDs, classes) to match elements that don't follow
regular CSS syntax. For example, to match by classname <p class="one.two">, use document.select("p.one\\.two");
<https://github.com/jhy/jsoup/issues/838>
* Improvement: when pretty-printing, wrap text that follows a <br> tag.
<https://github.com/jhy/jsoup/issues/1858>
* Improvement: when pretty-printing, normalize newlines that follow self-closing tags in custom tags.
<https://github.com/jhy/jsoup/issues/1852>
* Improvement: when pretty-printing, collapse non-significant whitespace between a block and an inline tag.
<https://github.com/jhy/jsoup/issues/1802>
* Improvement: in Element#forEach and Node#forEachNode, use java.util.function.Consumer instead of the previous
Android compatibility shim org.jsoup.helper.Consumer. Subsequently, the latter has been deprecated.
<https://github.com/jhy/jsoup/pull/1870>
* Improvement: added a new method Document#forms(), to conveniently retrieve a List<FormElement> containing the <form>
elements in a document.
* Improvement: added a new method Document#expectForm(query), to find the first matching FormElement, or blow up
trying.
* Bugfix: URLs containing characters such as [ and ] were not escaped correctly, and would throw a
MalformedURLException when fetched.
<https://github.com/jhy/jsoup/issues/1873>
* Bugfix: Element.cssSelector would create invalid selectors for elements where the tag name, ID, or classnames needed
to be escaped (e.g. if a class name contained a ':' or '.').
<https://github.com/jhy/jsoup/issues/1742>
* Bugfix: element.text() should have a space between a block and an inline element.
<https://github.com/jhy/jsoup/issues/1877>
* Bugfix: if a Node or an Element was replaced with itself, that node would incorrectly be orphaned.
<https://github.com/jhy/jsoup/issues/1843>
* Bugfix: form data on a previous request was copied to a new request in newRequest(), resulting in an accumulation of
form data when executing multi-step form submissions, or data sent to later requests incorrectly. Now, newRequest()
only copies session related settings (cookies, proxy settings, user-agent, etc) but not the request data nor the
body.
<https://github.com/jhy/jsoup/issues/1778>
* Bugfix: fixed an issue in Safelist.removeAttributes which could throw a ConcurrentModificationException when using
the ":all" pseudo-attribute.
* Bugfix: given extremely deeply nested HTML, a number of methods in Element could throw a StackOverflowError due
to excessive recursion. Namely: #data(), #hasText(), #parents(), and #wrap(html).
<https://github.com/jhy/jsoup/issues/1864>
* Change: deprecated the unused Document#normalise() method. Normalization occurs during the HTML tree construction,
and no longer as a distinct phase.
Release 1.15.3 [2022-Aug-24]
* Security: fixed an issue where the jsoup cleaner may incorrectly sanitize crafted XSS attempts if
SafeList.preserveRelativeLinks is enabled.
<https://github.com/jhy/jsoup/security/advisories/GHSA-gp7f-rwcx-9369>
* Improvement: the Cleaner will preserve the source position of cleaned elements, if source tracking is enabled in the
original parse.
* Improvement: the error messages output from Validate are more descriptive. Exceptions are now ValidationExceptions
(extending IllegalArgumentException). Stack traces do not include the Validate class, to make it simpler to see
where the exception originated. Common validation errors including malformed URLs and empty selector results have
more explicit error messages.
* Bugfix: the DataUtil would incorrectly read from InputStreams that emitted reads less than the requested size. This
lead to incorrect results when parsing from chunked server responses, for example.
<https://github.com/jhy/jsoup/issues/1807>
* Build Improvement: added implementation version and related fields to the jar manifest.
<https://github.com/jhy/jsoup/issues/1809>
*** Release 1.15.2 [2022-Jul-04]
* Improvement: added the ability to track the position (line, column, index) in the original input source from where
a given node was parsed. Accessible via Node.sourceRange() and Element.endSourceRange().
<https://github.com/jhy/jsoup/pull/1790>
* Improvement: added Element.firstElementChild(), Element.lastElementChild(), Node.firstChild(), Node.lastChild(),
as convenient accessors to those child nodes and elements.
* Improvement: added Element.expectFirst(cssQuery), which is just like Element.selectFirst(), but instead of returning
a null if there is no match, will throw an IllegalArgumentException. This is useful if you want to simply abort
processing if an expected match is not found.
* Improvement: when pretty-printing HTML, doctypes are emitted on a newline if there is a preceding comment.
<https://github.com/jhy/jsoup/pull/1664>
* Improvement: when pretty-printing, trim the leading and trailing spaces of textnodes in block tags when possible,
so that they are indented correctly.
<https://github.com/jhy/jsoup/issues/1798>
* Improvement: in Element#selectXpath(), disable namespace awareness. This makes it possible to always select elements
by their simple local name, regardless of whether an xmlns attribute was set.
<https://github.com/jhy/jsoup/issues/1801>
* Bugfix: when using the readToByteBuffer method, such as in Connection.Response.body(), if the document has not
already been parsed and must be read fully, and there is any maximum buffer size being applied, only the default
internal buffer size is read.
<https://github.com/jhy/jsoup/issues/1774>
* Bugfix: when serializing HTML, newlines in elements descending from a pre tag were incorrectly skipped. That caused
what should have been preformatted output to instead be a run of text.
<https://github.com/jhy/jsoup/issues/1776>
* Bugfix: when pretty-print serializing HTML, newlines separating phrasing content (e.g. a <span> tag within a <p> tag
would be incorrectly skipped, instead of normalized to a space. Additionally, improved space normalization between
other end of line occurrences, and whitespace handling after a closing </body>
<https://github.com/jhy/jsoup/issues/1787>
*** Release 1.15.1 [2022-May-15]
* Change: removed previously deprecated methods and classes (including org.jsoup.safety.Whitelist; use
org.jsoup.safety.Safelist instead).
* Improvement: when converting jsoup Documents to W3C Documents in W3CDom, preserve HTML valid attribute names if the
input document is using the HTML syntax. (Previously, would always coerce using the more restrictive XML syntax.)
<https://github.com/jhy/jsoup/pull/1648>
* Improvement: added the :containsWholeText(text) selector, to match against non-normalized Element text. That can be
useful when elements can only be distinguished by e.g. specific case, or leading whitespace, etc.
<https://github.com/jhy/jsoup/issues/1636>
* Improvement: added Element#wholeOwnText() to retrieve the original (non-normalized) ownText of an Element. Also
added the :containsWholeOwnText(text) selector, to match against that. BR elements are now treated as newlines
in the wholeText methods.
<https://github.com/jhy/jsoup/issues/1636>
* Improvement: added the :matchesWholeText(regex) and :matchesWholeOwnText(regex) selectors, to match against whole
(non-normalized, case sensitive) element text and own text, respectively.
<https://github.com/jhy/jsoup/issues/1636>
* Improvement: when evaluating an XPath query against a context element, the complete document is now visible to the
query, vs only the context element's sub-tree. This enables support for queries outside (parent or sibling) the
element, e.g. ancestor-or-self::*.
<https://github.com/jhy/jsoup/issues/1652>
* Improvement: allow a maxPaddingWidth on the indent level in OutputSettings when pretty printing. This defaults to
30 to limit the indent level for very deeply nested elements, and may be disabled by setting to -1.
<https://github.com/jhy/jsoup/pull/1655>
* Improvement: when cloning a Node or an Element, the clone gets a cloned OwnerDocument containing only that clone, so
as to preserve applicable settings, such as the Pretty Print settings.
<https://github.com/jhy/jsoup/issues/763>
* Improvement: added a convenience method Jsoup.parse(File).
<https://github.com/jhy/jsoup/issues/1693>
* Improvement: in the NodeTraversor, added default implementations for NodeVisitor.tail() and NodeFilter.tail(), so
that code using only head() methods can be written as lambdas.
* Improvement: in NodeTraversor, added support for removing nodes via Node.remove() during NodeVisitor.head().
<https://github.com/jhy/jsoup/issues/1699>
* Improvement: added Node.forEachNode(Consumer<Node>) and Element.forEach(Consumer<Element) methods, to efficiently
traverse the DOM with a functional interface.
<https://github.com/jhy/jsoup/issues/1700>
* Bugfix: boolean attribute names should be case-insensitive, but were not when the parser was configured to preserve
case.
<https://github.com/jhy/jsoup/issues/1656>
* Bugfix: when reading from SequenceInputStreams across the buffer, the input stream was closed too early, resulting
in missed content.
<https://github.com/jhy/jsoup/pull/1671>
* Bugfix: a comment with all dashes (<!----->) should not emit a parse error.
<https://github.com/jhy/jsoup/issues/1667>
* Bugfix: when throwing a SelectorParseException for an invalid selector, don't try to String.format the input, as
that could throw an IllegalFormatException.
<https://github.com/jhy/jsoup/issues/1691>
* Bugfix: when serializing HTML with Pretty Print enabled, extraneous whitespace may be added on closing tags, or
extra newlines may be added at the end of script blocks.
<https://github.com/jhy/jsoup/issues/1688>
<https://github.com/jhy/jsoup/issues/1689>
* Bugfix: when copy-creating a Safelist from another, perform a deep-copy of the original's settings, so that changes
to the original after creation do not affect the copy.
<https://github.com/jhy/jsoup/pull/1763>
* Bugfix [Fuzz]: speed improvement when parsing constructed HTML containing very deeply incorrectly stacked formatting
elements with many attributes.
<https://github.com/jhy/jsoup/issues/1695>
* Bugfix [Fuzz]: during parsing, a StackOverflowException was possible given crafted HTML with hundreds of nested
table elements followed by invalid formatting elements.
<https://github.com/jhy/jsoup/issues/1697>
*** Release 1.14.3 [2021-Sep-30]
* Improvement: added native XPath support in Element#selectXpath(String)
<https://github.com/jhy/jsoup/pull/1629>
* Improvement: added full support for the <template> tag to the HTML5 parser spec.
<https://github.com/jhy/jsoup/issues/1634>
* Improvement: added support in CharacterReader to track newlines, so that parse errors can be reported more
intuitively.
<https://github.com/jhy/jsoup/pull/1624>
* Improvement: tracked parse errors now have more details, including the erroneous token, to help clarify the errors.
* Improvement: speed and memory optimizations for the :has(subquery) selector.
* Improvement: the :contains(text) and :containsOwn(text) selectors are now whitespace normalized, aligning to the
document text that they are matching against.
<https://github.com/jhy/jsoup/issues/876>
* Improvement: in Element, speed optimized adopting all of an element's child nodes into a currently empty element.
Improves the HTML adoption agency algorithm when adopting elements with many children.
<https://github.com/jhy/jsoup/issues/1638>
* Improvement: increased the parse speed when in RCData (e.g. <title>) and unescaped <tag> tokens are found, by
memoizing the </title> scan and reducing GC.
<https://github.com/jhy/jsoup/issues/1644>
* Improvement: when parsing custom tags (in HTML or XML), added a flyweight cache on Tag.valueOf(name) to reduce
memory overhead when many tags are repeated. Also tuned other areas of the parser when many very deeply stacked
custom elements were present.
<https://github.com/jhy/jsoup/issues/1646>
* Bugfix: when tracking errors or checking for validity in the Cleaner, errors were incorrectly raised for missing
optional closing tags.
* Bugfix: the OSGi bundle meta-data incorrectly set a version on the import of javax.annotation (used as a build-time
dependency for nullability assertions).
<https://github.com/jhy/jsoup/issues/1616>
* Bugfix: the Attributes::equals() method was sensitive to the order of its contents, but it should not be.
<https://github.com/jhy/jsoup/issues/1492>
* Bugfix: when the HTML parser was configured to preserve case, Element text methods would miss adding whitespace for
"BR" tags.
* Bugfix: attribute names are now normalized & validated correctly for the specific output syntax (HTML or XML).
Previously, syntactically invalid attribute names could be output by the html() methods. Such attributes are still
available in the DOM, and will be normalized if possible on output.
<https://github.com/jhy/jsoup/issues/1474>
* Bugfix [Fuzz]: fixed an IOOB when an empty select tag was followed by a body tag that needed reparenting.
<https://github.com/jhy/jsoup/issues/1639>
* Build Improvement: fixed nullability annotations for Node.equals(other) and other equals methods.
<https://github.com/jhy/jsoup/issues/1628>
* Build Improvement: added JDK 17 to the CI builds.
<https://github.com/jhy/jsoup/pull/1641>
*** Release 1.14.2 [2021-Aug-15]
* Improvement: support Pattern.quote \Q and \E escapes in the selector regex matchers.
<https://github.com/jhy/jsoup/pull/1536>
* Improvement: Element.absUrl() now supports tel: URLs, and other URLs that are already absolute but that Java does
not have input stream handlers for.
<https://github.com/jhy/jsoup/issues/1610>
* Bugfix: when serializing output, escape characters that are in the < 0x20 range. This improves XML output
compatibility, and makes HTML output with these characters easier to read (as they're otherwise invisible).
<https://github.com/jhy/jsoup/issues/1556>
* Bugfix: the *|el wildcard namespace selector now also matches elements with no namespace.
<https://github.com/jhy/jsoup/issues/1565>
* Bugfix: corrected a potential case of the parser input stream not being closed immediately on a read exception.
* Bugfix: when making a HTTP POST, if the request write fails, make sure the connection is immediately cleaned up.
* Bugfix: in the XML parser, XML processing instructions without attributes would be serialized as if they did.
<https://github.com/jhy/jsoup/issues/770>
* Bugfix: updated the HtmlTreeParser resetInsertionMode to the current spec for supported elements.
<https://github.com/jhy/jsoup/issues/1491>
* Bugfix: fixed an NPE when parsing fragment HTML into a standalone table element.
<https://github.com/jhy/jsoup/issues/1603>
* Bugfix: fixed an NPE when parsing fragment heading HTML into a standalone p element.
<https://github.com/jhy/jsoup/issues/1601>
* Bugfix: fixed an IOOB when parsing a formatting fragment into a standalone p element.
<https://github.com/jhy/jsoup/issues/1602>
* Bugfix: tag names must start with an ascii-alpha character.
<https://github.com/jhy/jsoup/issues/1006>
* Bugfix [Fuzz]: fixed a slow parse when a tag or an attribute name has thousands of null characters in it.
<https://github.com/jhy/jsoup/issues/1580>
* Bugfix [Fuzz]: the adoption agency algorithm can have an incorrect bookmark position
<https://github.com/jhy/jsoup/issues/1576>
* Bugfix [Fuzz]: malformed HTML could result in null elements on stack
<https://github.com/jhy/jsoup/issues/1579>
* Bugfix [Fuzz]: malformed deeply nested table elements could create a stack overflow.
<https://github.com/jhy/jsoup/issues/1577>
* Bugfix [Fuzz]: Speed optimized malformed HTML creating elements with thousands of elements - limit the attribute
count per element when parsing to 512 (in real-world HTML, P99 is ~ 8).
<https://github.com/jhy/jsoup/issues/1578>
* Bugfix [Fuzz]: Speed improvement for the foster formatting elements algo, by limiting how far up a crafted stack
to scan.
<https://github.com/jhy/jsoup/issues/1593>
* Bugfix [Fuzz]: Speed improvement when parsing crafted HTML when transferring form attributes.
<https://github.com/jhy/jsoup/issues/1595>
* Bugfix [Fuzz]: Speed improvement when the stack was thousands of items deep, and non-matching close tags sent.
<https://github.com/jhy/jsoup/issues/1596>
* Bugfix [Fuzz]: Speed improvement when an attribute name is 600K of quote characters or otherwise needs accumulation
vs being able to read in one hit.
<https://github.com/jhy/jsoup/issues/1605>
* Bugfix [Fuzz]: Speed improvement when closing missing empty tags (in XML comment processed as HTML) when thousands
deep in stack.
<https://github.com/jhy/jsoup/issues/1606>
* Bugfix [Fuzz]: Fix a potential stack-overflow in the parser given crafted HTML, when the parser looped in the
InSelectInTable state.
* Bugfix [Fuzz]: Fix an IOOB when the HTML root was cleared from the stack and then attributes were merged onto it.
<https://github.com/jhy/jsoup/issues/1611>
* Bugfix [Fuzz]: Improved the speed of parsing when crafted HTML contains hundreds of active formatting elements
that were copied for all new elements (similar to an amplification attack). The number of considered active
formatting elements that will be cloned when mis-nested is now capped to 12.
<https://github.com/jhy/jsoup/issues/1613>
*** Release 1.14.1 [2021-Jul-10]
* Change: updated the minimum supported Java version from Java 7 to Java 8.
* Change: updated the minimum Android API level from 8 to 10.
* Change: although Node#childNodes() returns an UnmodifiableList as a view into its children, it was still
directly backed by the internal child list. That made some uses, such as looping and moving those children to
another element, throw a ConcurrentModificationException. Now this method returns its own list so that they are
separated and changes to the parent's contents will not impact the children view. This aligns with similar methods
such as Element#children(). If you have code that iterates this list and makes parenting changes to its contents,
you may need to make a code update.
<https://github.com/jhy/jsoup/issues/1431>
* Change: the org.jsoup.Connection interface has been modified to introduce new methods for sessions and the cookie
store. If you have a custom implementation of this interface, you will need to add implementations of these methods.
* Improvement: added HTTP request session management support with Jsoup.newSession(). This extends the Connection
implementation to support (optional) sessions, which allow request defaults (timeout, proxy, etc) to be set once and
then applied to all requests within that session.
Cookies are re-implemented to correctly support path and domain filtering when used within a session. A default
in-memory cookie store is used for the session, or a custom implementation (perhaps disk-persistent, or pre-set)
can be used instead.
Forms submitted using the FormElement#submit() use the same session that was used to fetch the document and so pass
cookies and other defaults appropriately.
The session is multi-thread safe and can execute multiple requests concurrently. If the user accidentally tries to
execute the same request object across multiple threads (vs calling Connection#newRequest()),
that is detected cleanly and a clear exception is thrown (vs weird blowups in input stream reading, or forcing
everything through a synchronized bottleneck.
<https://github.com/jhy/jsoup/pull/1476>
* Improvement: renamed the Whitelist class to Safelist, with the goal of more inclusive language. A shim is provided
for backwards compatibility (source and binary). This shim is marked as deprecated and will be removed in the
jsoup 1.15.1 release.
<https://github.com/jhy/jsoup/pull/1464>
* Improvement: added support for Internationalized Domain Names (IDNs) in Jsoup.Connect.
<https://github.com/jhy/jsoup/issues/1300>
* Improvement: added support for loading and parsing gzipped HTML files in Jsoup.parse(File in, charset, baseUri).
* Improvement: reduced thread contention in HttpConnection and Document.
<https://github.com/jhy/jsoup/pull/1455>
* Improvement: better parsing performance when under high thread concurrency
<https://github.com/jhy/jsoup/pull/1402>
* Improvement: added Element#id(String) ID attribute setter.
* Improvement: in Document, #body() and #head() accessors will now automatically create those elements, if they were
missing (e.g. if the Document was not parsed from HTML). Additionally, the #body() method returns the frameset
element (instead of null) for frameset documents.
* Improvement: when cleaning a document, the output settings of the original document are cloned into the cleaned
document.
<https://github.com/jhy/jsoup/issues/1417>
* Improvement: when parsing XML, disable pretty-printing by default.
<https://github.com/jhy/jsoup/issues/1168>
* Improvement: much better performance in Node#clone() for large and deeply nested documents. Complexity was O(n^2) or
worse, now O(n).
* Improvement: during traversal using the NodeTraversor, nodes may now be replaced with Node#replaceWith(Node).
<https://github.com/jhy/jsoup/issues/1289>
* Improvement: added Element#insertChildren and Element#prependChildren, as convenience methods in addition to
Element#insertChildren(index, children), for bulk moving nodes.
* Improvement: clean up relative URLs with too many .. segments better.
<https://github.com/jhy/jsoup/pull/1482>
* Build Improvement: integrated jsoup into the OSS Fuzz project, which semi-randomly generates millions of different
HTML and XML input files, searching for areas to improve in the parser for increased robustness and throughput.
<https://github.com/jhy/jsoup/issues/1502>
* Build Improvement: integrated with GitHub's CodeQL static code analyzer.
<https://github.com/jhy/jsoup/pull/1494>
* Build Improvement: moved to GitHub Workflows for build verification.
* Build Improvement: updated Jetty (used for integration tests; not bundled) to 9.4.42.
* Build Improvement: added nullability annotations and initial settings.
<https://github.com/jhy/jsoup/pull/1467>
* Bugfix: corrected the adoption agency algorithm, to handle cases where e.g. a <a> tag incorrectly nests further <a>
tags.
<https://github.com/jhy/jsoup/pull/1517> <https://github.com/jhy/jsoup/issues/845>
* Bugfix: when parsing HTML, could throw NPEs on some tags (isindex or table>input).
<https://github.com/jhy/jsoup/issues/1404>
* Bugfix: in HttpConnection.Request, headers beginning with "sec-" (e.g. Sec-Fetch-Mode) were silently discarded by
the underlying Java HttpURLConnection. These are now settable correctly.
<https://github.com/jhy/jsoup/issues/1461>
* Bugfix: when adding child Nodes to a Node, could incorrectly reparent all nodes if the first parent had the same
length of children as the incoming node list.
* Bugfix: when wrapping an orphaned element, would throw an NPE.
* Bugfix: when wrapping an element with HTML that included multiple sibling elements, those siblings were incorrectly
added as children of the wrapper instead of siblings.
* Bugfix: when setting the content of a script or style tag via the Element#html(String) method, the content is now
treated as a DataNode, not a TextNode. This means that characters like '<' will no longer be incorrectly escaped.
As a related ergonomic improvement, the same behavior applies for Element#text(String) (i.e. the content will be
treated as a DataNode, despite calling the text() method.
<https://github.com/jhy/jsoup/issues/1419>
* Bugfix: when wrapping HTML around an existing element with Element#wrap(String), will now take the content as
provided and ignore normal HTML tree-building rules. This allows for e.g. a div tag to be placed inside of p tags.
* Bugfix: the Elements#forms() method should return the selected immediate elements that are Forms, not children.
<https://github.com/jhy/jsoup/pull/1403>
* Bugfix: when creating a selector for an element with Element#cssSelector, if the element used a non-unique ID
attribute, the returned selector may not match the desired element.
<https://github.com/jhy/jsoup/issues/1085>
* Bugfix: corrected the toString() methods of the Evaluator classes.
* Bugfix: when converting a jsoup document to a W3C document (in W3CDom#convert), if a tag had XML illegal characters,
a DOMException would be thrown. Now instead, that tag is represented as a text node.
<https://github.com/jhy/jsoup/issues/1093>
* Bugfix: if a HTML file ended with an open noscript tag, an "EOF" string would appear in the HTML output.
* Bugfix: when parsing a document as XML, automatically set the output syntax to XML, and ensure that "<" characters
in attributes are escaped as "<" (which is not required in HTML as the quoted attribute contents are safe, but is
required in XML).
<https://github.com/jhy/jsoup/issues/1420>
* Bugfix: [Fuzz] when parsing an attribute key containing "abs:abs", a validation error would be incorrectly
thrown.
<https://github.com/jhy/jsoup/issues/1541>
* Bugfix: [Fuzz] could NPE while parsing in resetInsertionMode().
<https://github.com/jhy/jsoup/issues/1538>
* Bugfix: [Fuzz] when parsing XML, could Stack Overflow when parsing XML declarations.
<https://github.com/jhy/jsoup/issues/1539>
* Bugfix: [Fuzz] fixed a potential Stack Overflow when parsing mis-nested tfoot tags, and updated the tree parser for
this situation to match the updated HTML5 spec.
<https://github.com/jhy/jsoup/issues/1543>
* Bugfix: [Fuzz] fixed a potentially slow HTML parse when tags are nested extremely deep (e.g. 88K depth), by limiting
the formatting tag search depth to 256. In practice, it's generally between 4 - 8.
<https://github.com/jhy/jsoup/issues/1544>
* Bugfix: [Fuzz] when parsing an unterminated RCDATA token (e.g. a <title> tag), could throw an IO Exception "No
buffer left to unconsume" when trying to rewind the buffer.
<https://github.com/jhy/jsoup/issues/1542>
*** Release 1.13.1 [2020-Feb-29]
* Improvement: added Element#closest(selector), which walks up the tree to find the nearest element matching the
selector.
<https://github.com/jhy/jsoup/issues/1326>
* Improvement: memory optimizations, reducing the retained size of a Document by ~ 39%, and allocations by ~ 9%:
1. Attributes holder in Elements is only created if the element has attributes
2. Only track the baseUri in an element when it is set via DOM to a new value for a given tree
3. After parsing, do not retain the input character reader (and associated buffers) in the Document#parser
* Improvement: substantial parse speed improvements vs 1.12.x (bringing back to par with previous releases).
<https://github.com/jhy/jsoup/issues/1327>
* Improvement: when pretty-printing, comments in inline tags are not pushed to a newline
* Improvement: added Attributes#hasDeclaredValueForKey(key) and Attribute#hasDeclaredValueForKeyIgnoreCase(), to check
if an attribute is set but has no value. Useful in place of the deprecated and removed BooleanAttribute class and
instanceof test.
* Improvement: removed old methods and classes that were marked deprecated in previous releases.
* Improvement: added Element#select(Evaluator) and Element#selectFirst(Evaluator), to allow re-use of a parsed CSS
selector if using the same evaluator many times.
<https://github.com/jhy/jsoup/issues/1319>
* Improvement: added Elements#forms(), Elements#textNodes(), Elements#dataNodes(), and Elements#comments(), as a
convenient way to get access to these node types directly from an element selection.
* Improvement: preserve whitespace before html and head tag, if pretty-printing is off.
* Bugfix: in a <select> tag, a second <optgroup> would not automatically close an earlier open <optgroup>
<https://github.com/jhy/jsoup/issues/1313>
* Bugfix: in CharacterReader when parsing an input stream, could throw a Mark Invalid exception if the reader was
marked, a bufferUp occurred, and then the reader was rewound.
<https://github.com/jhy/jsoup/issues/1324>
* Bugfix: empty tags and form tags did not have their attributes normalized (lower-cased by default)
<https://github.com/jhy/jsoup/pull/1323>
* Bugfix: when preserve case was set to on, the HTML pretty-print formatter didn't indent capitalized tags correctly.
* Bugfix: ensure that script and style contents are parsed into DataNodes, not TextNodes, when in case-sensitive
parse mode.
**** Release 1.12.2 [2020-Feb-08]
* Improvement: the :has() selector now supports relative selectors. For example, the query
"div:has(> a)" will select all "div" elements that have at least one direct child "a" element.
<https://github.com/jhy/jsoup/pull/1214>
* Improvement: added Element chaining methods for various overridden methods on Node.
<https://github.com/jhy/jsoup/issues/1193>
* Improvement: ensure HTTP keepalives work when fetching content via body() and bodyAsBytes().
<https://github.com/jhy/jsoup/issues/1232>
* Improvement: set the default max body size in Jsoup.Connection to 2MB (up from 1MB) so fewer people get trimmed
content if they have not set it, but still in sensible bounds. Also updated the default user-agent to improve
default compatibility.
* Improvement: dramatic speed improvement when bulk inserting child nodes into an element (wrapping contents).
<https://github.com/jhy/jsoup/issues/1281>
* Improvement: added Element#childrenSize() as a convenience to get the size of an element's element children.
<https://github.com/jhy/jsoup/pull/1291>
* Improvement: in W3CDom.asString, allow the output mode to be specified as HTML or as XML. It will default to
checking the content, and automatically selecting.
* Improvement: added a Document#documentType() method, to get a doc's doctype.
* Improvement: To DocumentType, added #name(), #publicID(), and #systemId() methods to fetch those fields.
* Improvement: in W3CDom conversions from jsoup documents, retain the DocumentType, and be able to serialize it.
<https://github.com/jhy/jsoup/issues/1183>
* Bugfix: on pages fetch by Jsoup.Connection, a "Mark Invalid" exception might be incorrectly thrown, or the page may
miss some data. This occurred on larger pages when the file transfer was chunked, and an invalid HTML entity
happened to cross a chunk boundary.
<https://github.com/jhy/jsoup/issues/1218>
* Bugfix: if duplicate attributes in an element exist, retain the first vs the last attribute with the same name. Case
aware (HTML case-insensitive names, XML are case-sensitive).
<https://github.com/jhy/jsoup/issues/1219>
* Bugfix: don't submit input type=button form elements.
<https://github.com/jhy/jsoup/issues/1231>
* Bugfix: handle error position reporting correctly and don't blow up in some edge cases.
<https://github.com/jhy/jsoup/issues/1251>
<https://github.com/jhy/jsoup/pull/1253>
* Bugfix: handle the ^= (starts with) selector correctly when the prefix starts with a space.
<https://github.com/jhy/jsoup/pull/1280>
* Bugfix: don't strip out zero-width-joiners (or zero-width-non-joiners) when normalizing text. That breaks combined
emoji (and other text semantics). 🤦♂️
<https://github.com/jhy/jsoup/issues/1269>
* Bugfix: Evaluator.TagEndsWith (namespaced elements) and Tag disagreed in case-sensitivity. Now correctly matches
case-insensitively.
<https://github.com/jhy/jsoup/issues/1257>
* Bugfix: Don't throw an exception if a selector ends in a space, just trim it.
<https://github.com/jhy/jsoup/issues/1274>
* Bugfix: HTML parser adds redundant text when parsing self-closing textarea.
<https://github.com/jhy/jsoup/issues/1220>
* Bugfix: Don't add spurious whitespace or newlines to HTML or text for inline tags.
<https://github.com/jhy/jsoup/issues/1305>
<https://github.com/jhy/jsoup/issues/731>
* Bugfix: TextNode.outerHtml() wouldn't normalize correctly without a parent.
<https://github.com/jhy/jsoup/issues/1309>
* Bugfix: Removed binary input detection as it was causing too many false positives.
<https://github.com/jhy/jsoup/issues/1250>
* Bugfix: when cloning a TextNode, if .attributes() was hit before the clone() method, the text value would only be a
shallow clone.
<https://github.com/jhy/jsoup/issues/1176>
* Various code hygiene updates.
**** Release 1.12.1 [2019-May-12]
* Change: removed deprecated method to disable TLS cert checking Connection.validateTLSCertificates().
* Change: some internal methods have been rearranged; if you extended any of the Jsoup internals you may need to make
updates.
* Improvement: documents now remember their parser, so when later manipulating them, the correct HTML or XML tree
builder is reused, as are the parser settings like case preservation.
<https://github.com/jhy/jsoup/issues/769>
* Improvement: Jsoup now detects the character set of the input if specified in an XML Declaration, when using the
HTML parser. Previously that only happened when the XML parser was specified.
<https://github.com/jhy/jsoup/issues/1009>
* Improvement: if the document's input character set does not support encoding, flip it to one that does.
<https://github.com/jhy/jsoup/issues/1007>
* Improvement: if a start tag is missing a > and a new tag is seen with a <, treat that as a new tag. (This differs
from the HTML5 spec, which would make at attribute with a name beginning with <, but in practice this impacts too
many pages.
<https://github.com/jhy/jsoup/issues/797>
* Improvement: performance tweaks when parsing start tags, data, tables.
* Improvement: added Element.nextElementSiblings() and Element.previousElementSiblings()
<https://github.com/jhy/jsoup/pull/1054>
* Improvement: treat center tags as block tags.
<https://github.com/jhy/jsoup/pull/1113>
* Improvement: allow forms to be submitted with Content-Type=multipart/form-data without requiring a file upload;
automatically set the mime boundary.
<https://github.com/jhy/jsoup/pull/1058>
* Improvement: Jsoup will now detect if an input file or URL is binary, and will refuse to attempt to parse it, with
an IO exception. This prevents runaway processing time and wasted effort creating meaningless parsed DOM trees.
<https://github.com/jhy/jsoup/issues/1192>
* Bugfix: when using the tag case preserving parsing settings, certain HTML tree building rules where not followed
for upper case tags.
<https://github.com/jhy/jsoup/issues/1149>
* Bugfix: when converting a Jsoup document to a W3C DOM, if an element is namespaced but not in a defined namespace,
set it to the global namespace.
<https://github.com/jhy/jsoup/issues/848>
* Bugfix: attributes created with the Attribute constructor with just spaces for names would incorrectly pass
validation.
<https://github.com/jhy/jsoup/issues/1159>
* Bugfix: some pseudo XML Declarations were incorrectly handled when using the XML Parser, leading to an IOOB
exception when parsing.
<https://github.com/jhy/jsoup/issues/1139>
* Bugfix: when parsing URL parameter names in an attribute that is not correctly HTML encoded, and near the end of the
current buffer, those parameters may be incorrectly dropped. (Improved CharacterReader mark/reset support.)
<https://github.com/jhy/jsoup/pull/1154>
* Bugfix: boolean attribute values would be returned as null, vs an empty string, when accessed via the
Attribute#getValue() method.
<https://github.com/jhy/jsoup/issues/1065>
* Bugfix: orphan Attribute objects (i.e. created outside of a parse or an Element) would throw an NPE on
Attribute#setValue(val)
<https://github.com/jhy/jsoup/issues/1107>
* Bugfix: Element.shallowClone() was not making a clone of its attributes.
<https://github.com/jhy/jsoup/issues/1201>
* Bugfix: fixed an ArrayIndexOutOfBoundsException in HttpConnection.looksLikeUtf8 when testing small strings in
specific ranges.
<https://github.com/jhy/jsoup/issues/1172>
* Updated jetty-server (which is used for integration tests) to latest 9.2 series (9.2.28).
*** Release 1.11.3 [2018-Apr-15]
* Improvement: CDATA sections are now treated as whitespace preserving (regardless of the containing element), and are
round-tripped into output HTML.
<https://github.com/jhy/jsoup/issues/406>
<https://github.com/jhy/jsoup/issues/965>
* Improvement: added support for Deflate encoding.
<https://github.com/jhy/jsoup/pull/982>
* Improvement: when parsing <pre> tags, skip the first newline if present.
<https://github.com/jhy/jsoup/issues/825>
* Improvement: support nested quotes for attribute selection queries.
<https://github.com/jhy/jsoup/pull/988>
* Improvement: character references from Windows-1252 that are not valid Unicode are mapped to the appropriate
Unicode replacement.
<https://github.com/jhy/jsoup/pull/1046>
* Improvement: accept a custom SSL socket factory in Jsoup.Connection.
<https://github.com/jhy/jsoup/pull/1038>
* Bugfix: "Mark has been invalidated" exception was thrown when parsing some URLs on Android <= 6.
<https://github.com/jhy/jsoup/issues/990>
* Bugfix: The Element.text() for <div>One</div>Two was "OneTwo", not "One Two".
<https://github.com/jhy/jsoup/issues/812>
* Bugfix: boolean attributes with empty string values were not collapsing in HTML output.
<https://github.com/jhy/jsoup/issues/985>
* Bugfix: when using the XML Parser set to lowercase normalize tags, uppercase closing tags were not correctly
handled.
<https://github.com/jhy/jsoup/issues/998>
* Bugfix: when parsing from a URL, an end tag could be read incorrectly if it started on a buffer boundary.
<https://github.com/jhy/jsoup/issues/995>
* Bugfix: when parsing from a URL, if the remote server failed to complete its write (i.e. it writes less than the
Content Length header promised on a gzipped stream), the parse method would incorrectly throw an unchecked
exception. It now throws the declared IOException.
<https://github.com/jhy/jsoup/issues/980>
* Bugfix: leaf nodes (such as text nodes) where throwing an unsupported operation exception on childNodes(), instead
of just returning an empty list.
<https://github.com/jhy/jsoup/issues/1032>
* Bugfix: documents with a leading UTF-8 BOM did not have that BOM consumed, so it acted as a zero width no-break
space, which could impact the parse tree.
<https://github.com/jhy/jsoup/issues/1003>
* Bugfix: when parsing an invalid XML declaration, the parse would fail.
<https://github.com/jhy/jsoup/issues/1015>
*** Release 1.11.2 [2017-Nov-19]
* Improvement: added a new pseudo selector :matchText, which allows text nodes to match as if they were elements.
This enables finding text that is only marked by a "br" tag, for example.
<https://github.com/jhy/jsoup/issues/550>
* Change: marked Connection.validateTLSCertificates() as deprecated.
* Improvement: normalize invisible characters (like soft-hyphens) in Element.text().
<https://github.com/jhy/jsoup/issues/978>
* Improvement: added Element.wholeText(), to easily get the un-normalized text value of an element and its children.
<https://github.com/jhy/jsoup/pull/564>
* Bugfix: in a deep DOM stack, a StackOverFlow exception could occur when generating implied end tags.
<https://github.com/jhy/jsoup/issues/966>
* Bugfix: when parsing attribute values that happened to cross a buffer boundary, a character was dropped.
<https://github.com/jhy/jsoup/issues/967>
* Bugfix: fixed an issue that prevented using infinite timeouts in Jsoup.Connection.
<https://github.com/jhy/jsoup/issues/968>
* Bugfix: whitespace preserving tags were not honoured when nested deeper than two levels deep.
<https://github.com/jhy/jsoup/issues/722>
* Bugfix: an unterminated comment token at the end of the HTML input would cause an out of bounds exception.
<https://github.com/jhy/jsoup/issues/972>
* Bugfix: an NPE in the Cleaner which would occur if an <a href> attribute value was missing.
<https://github.com/jhy/jsoup/issues/973>
* Bugfix: when serializing the same document in a multiple threads, on Android, with a character set that is not ascii
or UTF-8, an encoding exception could occur.
<https://github.com/jhy/jsoup/issues/970>
* Bugfix: removing a form value from the DOM would not remove it from FormData.
<https://github.com/jhy/jsoup/pull/969>
* Bugfix: in the W3CDom transformer, siblings were incorrectly inheriting namespaces defined on previous siblings.
<https://github.com/jhy/jsoup/issues/977>
*** Release 1.11.1 [2017-Nov-06]
* Updated language level to Java 7 from Java 5. To maintain Android support (of minversion 8), try-with-resources are
not used.
<https://github.com/jhy/jsoup/issues/899>
* When loading content from a URL or a file, the content is now parsed as it streams in from the network or disk,
rather than being fully buffered before parsing. This substantially reduces memory consumption & large garbage
objects when loading large files. Note that this change means that a response, once parsed, may not be parsed
again from the same response object unless you call response.bufferUp() first, which will buffer the full response
into memory.
<https://github.com/jhy/jsoup/issues/904>
* Added Connection.Response.bodyStream(), a method to get the response body as an input stream. This is useful for
saving a large response straight to a file, without buffering fully into memory first.
* Performance improvements in text and HTML generation (through less GC).
* Reduced memory consumption of text, scripts, and comments in the DOM by 40%, by refactoring the node
hierarchy to not track childnodes or attributes by default for lead nodes. For the average document, that's about a
30% memory reduction.
<https://github.com/jhy/jsoup/issues/911>
* Reduced memory consumption of Elements by refactoring their Attributes to be a simple pair of arrays, vs a
LinkedHashSet.
<https://github.com/jhy/jsoup/issues/911>
* Added support for Element.selectFirst(query), to efficiently find the first matching element.
* Added Element.appendTo(parent) to simplify slinging elements about.
<https://github.com/jhy/jsoup/pull/662>
* Added support for multiple headers with the same name in Jsoup.Connect
* Added Element.shallowClone() and Node.shallowClone(), to allow cloning nodes without getting all their children.
<https://github.com/jhy/jsoup/issues/900>
* Updated Element.text() and the :contains(text) selector to consider character as spaces.
* Updated Jsoup.connect().timeout() to implement a total connect + combined read timeout. Previously it specified
connect and buffer read times only, so to implement a combined total timeout, you had to have another thread send
an interrupt.
* Improved performance of Node.addChildren (was quadratic)
<https://github.com/jhy/jsoup/pull/930>
* Added missing support for template tags in tables
<https://github.com/jhy/jsoup/pull/901>
* In Jsoup.connect file uploads, added the ability to set the uploaded files' mimetype.
<https://github.com/jhy/jsoup/issues/936>
* Improved Node traversal, including less object creation, and partial and filtering traversor support.
<https://github.com/jhy/jsoup/pull/849>
* Bugfix: if a document was re-decoded after character set detection, the HTML parser was not reset correctly,
which could lead to an incorrect DOM.
<https://github.com/jhy/jsoup/issues/877>
* Bugfix: attributes with the same name but different case would be incorrectly treated as different attributes.
<https://github.com/jhy/jsoup/pull/903>
* Bugfix: self-closing tags for known empty elements were incorrectly treated as errors.
<https://github.com/jhy/jsoup/issues/868>
* Bugfix: fixed an issue where a self-closing title, noframes, or style tag would cause the rest of the page to be
incorrectly parsed as data or text.
<https://github.com/jhy/jsoup/issues/906>
* Bugfix: fixed an issue with unknown mixed-case tags
<https://github.com/jhy/jsoup/pull/942>
* Bugfix: fixed an issue where the entity resources were left open after startup, causing a warning.
<https://github.com/jhy/jsoup/pull/928>
* Bugfix: fixed an issue where Element.getElementsByIndexLessThan(index) would incorrectly provide the root element
<https://github.com/jhy/jsoup/pull/918>
* Improved parse time for pages with exceptionally deeply nested tags.
<https://github.com/jhy/jsoup/issues/955>
* Improvement / workaround: modified the Entities implementation to load its data from a .class vs from a jar resource.
Faster, and safer on Android.
<https://github.com/jhy/jsoup/issues/959>
*** Release 1.10.3 [2017-Jun-11]
* Added Elements.eachText() and Elements.eachAttr(name), which return a list of Element's text or attribute values,
respectively. This makes it simpler to for example get a list of each URL on a page:
List<String> urls = doc.select("a").eachAttr("abs:href"");
* Improved selector validation for :contains(...) with unbalanced quotes.
<https://github.com/jhy/jsoup/issues/803>
* Improved the speed of index based CSS selectors and other methods that use elementSiblingIndex, by a factor of 34x.
<https://github.com/jhy/jsoup/pull/862>
* Added Node.clearAttributes(), to simplify removing of all attributes of a Node / Element.
<https://github.com/jhy/jsoup/issues/829>
* Bugfix: if an attribute name started or ended with a control character, the parse would fail with a validation
exception.
<https://github.com/jhy/jsoup/issues/793>
* Bugfix: Element.hasClass() and the ".classname" selector would not find the class attribute case-insensitively.
<https://github.com/jhy/jsoup/issues/814>
* Bugfix: In Jsoup.Connection, if a redirect contained a query string with %xx escapes, they would be double escaped
before the redirect was followed, leading to fetching an incorrect location.
* Bugfix: In Jsoup.Connection, if a request body was set and the connection was redirected, the body would incorrectly
still be sent.
<https://github.com/jhy/jsoup/pull/881>
* Bugfix: In DataUtil when detecting the character set from meta data, and there are two Content-Types defined, use
the one that defines a character set.
<https://github.com/jhy/jsoup/pull/835>
* Bugfix: when parsing unknown tags in case-sensitive HTML mode, end tags would not close scope correctly.
<https://github.com/jhy/jsoup/issues/819>
* In Jsoup.Connection, ensure there is no Content-Type set when being redirected to a GET.
<https://github.com/jhy/jsoup/pull/895>
* Bugfix: in certain locales (Turkey specifically), lowercasing and case insensitivity could fail for specific items.
<https://github.com/jhy/jsoup/pull/820>
* Bugfix: after an element was cloned, changes to its child list where not notifying the element correctly.
<https://github.com/jhy/jsoup/issues/951>
*** Release 1.10.2 [2017-Jan-02]
* Improved startup time, particularly on Android, by reducing garbage generation and CPU execution time when loading
the HTML entity files. About 1.72x faster in this area.
* Added Element.is(query) to check if an element matches this CSS query.
* Added new methods to Elements: next(query), nextAll(query), prev(query), prevAll(query) to select next and previous
element siblings from a current selection, with optional selectors.
* Added Node.root() to get the topmost ancestor of a Node.
* Added the new selector :containsData(), to find elements that hold data, like script and style tags.
* Changed Jsoup.isValid(bodyHtml) to validate that the input contains only body HTML that is safe according to the
safelist, and does not include HTML errors. And in the Jsoup.Cleaner.isValid(Document) method, make sure the doc
only includes body HTML.
<https://github.com/jhy/jsoup/issues/245>
<https://github.com/jhy/jsoup/issues/632>
* In Safelists, validate that a removed protocol exists before removing said protocol.
* Allow the Jsoup.Connect thread to be interrupted when reading the input stream; helps when reading from a long stream
of data that doesn't read timeout.
<https://github.com/jhy/jsoup/pull/712>
* Jsoup.Connect now uses a desktop user agent by default. Many developers were getting caught by not specifying the
user agent, and sending the default 'Java'. That causes many servers to return different content than what they would
to a desktop browser, and what the developer was expecting.
* Increased the default connect/read timeout in Jsoup.Connect to 30 seconds.
* Jsoup.Connect now detects if a header value is actually in UTF-8 vs the HTTP spec of ISO-8859, and converts
the header value appropriately. This improves compatibility with servers that are configured incorrectly.
* Bugfix: in Jsoup.Connect, URLs containing non-URL-safe characters were not encoded to URL safe correctly.
<https://github.com/jhy/jsoup/issues/706>
* Bugfix: a "SYSTEM" flag in doctype tags would be incorrectly removed.
<https://github.com/jhy/jsoup/issues/408>
* Bugfix: removing attributes from an Element with removeAttr() would cause a ConcurrentModificationException.
* Bugfix: the contents of Comment nodes were not returned by Element.data()
* Bugfix: if source checked out on Windows with git autocrlf=true, Entities.load would fail because of the \r char.
*** Release 1.10.1 [2016-Oct-23]
* New feature: added the option to preserve case for tags and/or attributes, with ParseSettings. By default, the HTML
parser will continue to normalize tag names and attribute names to lower case, and the XML parser will now preserve
case, according to the relevant spec. The CSS selectors for tags and attributes remain case insensitive, per the CSS
spec.
* Improved support for extended HTML entities, including supplemental characters and multiple character references.
Also reduced memory consumption of the entity tables.
<https://github.com/jhy/jsoup/issues/602>
<https://github.com/jhy/jsoup/issues/603>
* Added support for *|E wildcard namespace selectors.
<https://github.com/jhy/jsoup/pull/724>
* Added support for setting multiple connection headers at once with Connection.headers(Map)
<https://github.com/jhy/jsoup/pull/725>
* Added support for setting/overriding the response character set in Connection.Response, for cases where the charset
is not defined by the server, or is defined incorrectly.
<https://github.com/jhy/jsoup/issues/743>
* Improved performance of class selectors by reducing memory allocation and garbage collection.
<https://github.com/jhy/jsoup/pull/753>
* Improved performance of HTML output by reducing the creation of temporary attribute list iterators.
<https://github.com/jhy/jsoup/pull/755>
* Fixed an issue when converting to the W3CDom XML, where valid (but ugly) HTML attribute names containing characters
like '"' could not be converted into valid XML attribute names. These attribute names are now normalized if possible,
or not added to the XML DOM.
<https://github.com/jhy/jsoup/issues/721>
* Fixed an OOB exception when loading an empty-body URL and parsing with the XML parser.
<https://github.com/jhy/jsoup/issues/727>
* Fixed an issue where attribute names starting with a slash would be parsed incorrectly.
<https://github.com/jhy/jsoup/pull/748>
* Don't reuse charset encoders from OutputSettings, to make threadsafe.
<https://github.com/jhy/jsoup/issues/740>
* Fixed an issue in connections with a requestBody where a custom content-type header could be ignored.
<https://github.com/jhy/jsoup/issues/756>
*** Release 1.9.2 [2016-May-17]
* Fixed an issue where tag names that contained non-ascii characters but started with an ascii character
would cause the parser to get stuck in an infinite loop.
<https://github.com/jhy/jsoup/issues/704>
* In XML documents, detect the charset from the XML prolog - <?xml encoding="UTF-8"?>
<https://github.com/jhy/jsoup/issues/701>
* Fixed an issue where created XML documents would have an incorrect prolog.
<https://github.com/jhy/jsoup/issues/652>
* Fixed an issue where you could not use an attribute selector to find values containing unbalanced braces or
parentheses.
<https://github.com/jhy/jsoup/issues/611>
* Fixed an issue where namespaced tags (like <fb:comment>) would cause Element.cssSelector() to fail.
<https://github.com/jhy/jsoup/pull/677>
*** Release 1.9.1 [2016-Apr-16]
* Added support for HTTP and SOCKS request proxies, specifiable per connection.
<https://github.com/jhy/jsoup/pull/570>
* Added support for sending plain HTTP request bodies in POST and PUT requests, with Connection.requestBody(String).
* Added support in Jsoup.Connect for HEAD, OPTIONS, TRACE.
<https://github.com/jhy/jsoup/issues/613>
* Added support for HTTP 307 Temporary Redirect (replays posts, if applicable).
<https://github.com/jhy/jsoup/pull/666>
* Performance improvements when parsing HTML, particularly for Android Dalvik.
* Added support for writing HTML into Appendable objects (like OutputStreamWriter), to enable stream serialization.
<https://github.com/jhy/jsoup/pull/470/>
* Added support for XML namespaces when converting jsoup documents to W3C documents.
<https://github.com/jhy/jsoup/pull/672>
* Added support for UTF-16 and UTF-32 character set detection from byte-order-marks (BOM).
<https://github.com/jhy/jsoup/issues/695>
* Added support for tags with non-ascii (unicode) letters.
<https://github.com/jhy/jsoup/issues/667>
* Added Connection.data(key) to retrieve a data KeyVal by its key. Useful to update form data before submission.
* Fixed an issue in the Parent selector where it would not match against the root element it was applied to.
<https://github.com/jhy/jsoup/pull/619>
* Fix an issue where elements.select(query) would not return every matching element if they had the same content.
<https://github.com/jhy/jsoup/issues/614>
* Added not-null validators to Element.appendText() and Element.prependText()
<https://github.com/jhy/jsoup/issues/690>
* Fixed an issue when moving nodes using Element.insert(index, children) where the sibling index would be set
incorrectly, leading to the original loads being lost.
<https://github.com/jhy/jsoup/issues/689>
* Reverted Node.equals() and Node.hashCode() back to identity (object) comparisons, as deep content inspection
had negative performance impacts and hashkey stability problems. Functionality replaced with Node.hasSameContent().
<https://github.com/jhy/jsoup/issues/688>
* In Jsoup.Connect, if the same header key is seen multiple times, combine their values with a comma per the HTTP RFC,
instead of keeping just one value. Also fixes an issue where header values could be out of order.
<https://github.com/jhy/jsoup/issues/618>
*** Release 1.8.3 [2015-Aug-02]
* Added support for custom boolean attributes.
<https://github.com/jhy/jsoup/pull/555>
* When fetching XML URLs, automatically switch to the XML parser instead of the HTML parser.
<https://github.com/jhy/jsoup/pull/574>
* Performance improvement on parsing larger HTML pages. On Android KitKat, around 1.7x times faster. On Android
Lollipop, ~ 1.3x faster. Improvements largely from re-ordering the HtmlTreeBuilder methods based on analysis of
various websites; also from further memory reduction for nodes with no children, and other tweaks.
* Fixed an issue in Element.getElementSiblingIndex (and related methods) where sibling elements with the same content
would incorrectly have the same sibling index.
<https://github.com/jhy/jsoup/issues/554>
* Fixed an issue where unexpected elements in a badly nested table could be moved to the wrong location in the
document.
<https://github.com/jhy/jsoup/issues/552>
* Fixed an issue where a table nested within a TH cell would parse to an incorrect tree.
<https://github.com/jhy/jsoup/issues/575>
* When serializing a document using the XHTML encoding entities, if the character set did not support chars
(such as Shift_JIS), the character would be skipped. For visibility, will now always output &xa0; when using XHTML
encoding entities (as is not defined), regardless of the output character set.
<https://github.com/jhy/jsoup/issues/523>
* Fixed an issue when resolving URLs, if the absolute URL had no path, the relative URL was not normalized correctly.
Also fixed an issue where connections that were redirected to a relative URL did not have the same normalization
rules as a URL read from Nodes.absUrl(String).
<https://github.com/jhy/jsoup/issues/585>
* When serialising XML, ensure that '<' characters in attributes are escaped, per spec. Not required in HTML.
<https://github.com/jhy/jsoup/issues/528>
*** Release 1.8.2 [2015-Apr-13]
* Performance improvements for parsing HTML on Android, of 1.5x to 1.9x, with larger parses getting a bigger
speed increase. For non-Android JREs, around 1.1x to 1.2x.
* Dramatic performance improvement in HTML serialization on Android (KitKat and later), of 115x. Improvement by working
around a character set encoding speed regression in Android.
<https://github.com/jhy/jsoup/issues/383>
* Performance improvement for the class name selector on Android (.class) of 2.5x to 14x. Around 1.2x
on non-Android JREs.
* File upload support. Added the ability to specify input streams for POST data, which will upload content in
MIME multipart/form-data encoding.
* Add a meta-charset element to documents when setting the character set, so that the document's charset is
unambiguous.
<https://github.com/jhy/jsoup/pull/486>
* Added ability to disable TLS (SSL) certificate validation. Helpful if you're hitting a host with a bad cert,
or your JDK doesn't support SNI.
<https://github.com/jhy/jsoup/pull/343>
* Added ability to further tweak the canned Cleaner Safelists by removing existing settings.
<https://github.com/jhy/jsoup/pull/449>
* Added option in Cleaner Safelist to allow linking to in-page anchors (#)
<https://github.com/jhy/jsoup/pull/441>
* Use a lowercase doctype tag for HTML5 documents.
* Add support for 201 Created with redirect, and other status codes. Treats any HTTP status code 2xx or 3xx as an OK
response, and follow redirects whenever there is a Location header.
<https://github.com/jhy/jsoup/issues/312>
* Added support for HTTP method verbs PUT, DELETE, and PATCH.
* Added support for overriding the default POST character of UTF-8
<https://github.com/jhy/jsoup/pull/491>
* W3C DOM support: added ability to convert from a jsoup document to a W3C document, with the W3Dom helper class.
* In the HtmlToPlainText example program, added the ability to filter using a CSS selector. Also clarified
the usage documentation.
* Fixed validation of cookie names in HttpConnection cookie methods.
<https://github.com/jhy/jsoup/pull/377>
* Fixed an issue where <option> tags would be missed when preparing a form for submission if missing a selected
attribute.
* Fixed an issue where submitting a form would incorrectly include radio and checkbox values without the checked
attribute.
* Fixed an issue where Element.classNames() would return a set containing an empty class; and may have extraneous
whitespace.
<https://github.com/jhy/jsoup/pull/469>
* Fixed an issue where attributes selected by value were not correctly space normalized.
<https://github.com/jhy/jsoup/pull/526>
* In head+noscript elements, treat content as character data, instead of jumping out of head parsing.
<https://github.com/jhy/jsoup/pull/540>
* Fixed performance issue when parsing HTML with elements with many children that need re-parenting.
<https://github.com/jhy/jsoup/pull/506>
* Fixed an issue where a server returning an unsupported character set response would cause a runtime
UnsupportedCharsetException, instead of falling back to the default UTF-8 charset.
<https://github.com/jhy/jsoup/pull/509>
* Fixed an issue where Jsoup.Connection would throw an IO Exception when reading a page with zero content-length.
<https://github.com/jhy/jsoup/issues/538>
* Improved the equals() and hashcode() methods in Node, to consider all their child content, for DOM tree comparisons.
<https://github.com/jhy/jsoup/issues/537>
* Improved performance in Selector when searching multiple roots.
<https://github.com/jhy/jsoup/issues/518>
*** Release 1.8.1 [2014-Sep-27]
* Introduced the ability to chose between HTML and XML output, and made HTML the default. This means img tags are
output as <img>, not <img />. XML is the default when using the XmlTreeBuilder. Control this with the
Document.OutputSettings.syntax() method.
* Improved the performance of Element.text() by 3.2x
* Improved the performance of Element.html() by 1.7x
* Improved file read time by 2x, giving around a 10% speed improvement to file parses.
<https://github.com/jhy/jsoup/issues/248>
* Tightened the scope of what characters are escaped in attributes and textnodes, to align with the spec. Also, when
using the extended escape entities map, only escape a character if the current output charset does not support it.
This produces smaller, more legible HTML, with greater control over the output (by setting charset and escape mode).
* If pretty-print is disabled, don't trim outer whitespace in Element.html()
<https://github.com/jhy/jsoup/issues/368>
* In the HTML Cleaner, allow span tags in the basic safelist, and span and div tags in the relaxed safelist.
* Added Element.cssSelector(), which returns a unique CSS selector/path for an element.
<https://github.com/jhy/jsoup/pull/459>
* Fixed an issue where <svg><img/></svg> was parsed as <svg><image/></svg>
<https://github.com/jhy/jsoup/issues/364>
* Fixed an issue where a UTF-8 BOM character was not detected if the HTTP response did not specify a charset, and
the HTML body did, leading to the head contents incorrectly being parsed into the body. Changed the behavior so that
when the UTF-8 BOM is detected, it will take precedence for determining the charset to decode with.
<https://github.com/jhy/jsoup/issues/348>
* Relaxed doctype validation, allowing doctypes to not specify a name.
<https://github.com/jhy/jsoup/issues/460>
* Fixed an issue in parsing a base URI when loading a URL containing a http-equiv element.
<https://github.com/jhy/jsoup/issues/440>
* Fixed an issue for Java 1.5 / Android 2.2 compatibility, and verify it doesn't regress.
<https://github.com/jhy/jsoup/issues/375>
<https://github.com/jhy/jsoup/pull/403>
* Fixed an issue that would throw an NPE when trying to set invalid HTML into a title element.
<https://github.com/jhy/jsoup/pull/410>
* Added support for quoted attribute values in CSS Selectors
<https://github.com/jhy/jsoup/pull/400>
* Fixed support for nth-of-type selectors with unknown tags.
<https://github.com/jhy/jsoup/pull/402>
* Added support for 'application/*+xml' mimetypes.
<https://github.com/jhy/jsoup/pull/444>
* Fixed support for allowing script tags in cleaner Safelists.
<https://github.com/jhy/jsoup/issues/299>
<https://github.com/jhy/jsoup/issues/388>
* In FormElements, don't submit disabled inputs, and use 'on' as checkbox value default.
<https://github.com/jhy/jsoup/issues/489>
*** Release 1.7.3 [2013-Nov-10]
* Introduced FormElement, providing easy access to form controls and their data, and the ability to submit forms
with Jsoup.Connect.
* Reduced GC impact during HTML parsing, with 17% fewer objects created, and 3% faster parses.
* Reduced CSS selection time by 26% for common queries.
* Improved HTTP character set detection.
<https://github.com/jhy/jsoup/pull/325> <https://github.com/jhy/jsoup/issues/321>
* Added Document.location, to get the URL the document was retrieved from. Helpful if connection was redirected.
<https://github.com/jhy/jsoup/pull/306>
* Fixed support for self-closing script tags.
<https://github.com/jhy/jsoup/issues/305>
* Fixed a crash when reading an unterminated CDATA section.
<https://github.com/jhy/jsoup/issues/349>
* Fixed an issue where elements added via the adoption agency algorithm did not preserve their attributes.
<https://github.com/jhy/jsoup/issues/313>
* Fixed an issue when cloning a document with extremely nested elements that could cause a stack-overflow.
<https://github.com/jhy/jsoup/issues/290>
* Fixed an issue when connecting or redirecting to a URL that contains a space.
<https://github.com/jhy/jsoup/pull/354> <https://github.com/jhy/jsoup/issues/114>
* Added support for the HTTP/1.1 Temporary Redirect (307) status code.
<https://github.com/jhy/jsoup/issues/452>
*** Release 1.7.2 [2013-Jan-27]
* Added support for supplementary characters outside of the Basic Multilingual Plane.
<https://github.com/jhy/jsoup/issues/288> <https://github.com/jhy/jsoup/pull/289>
* Added support for structural pseudo CSS selectors, including :first-child, :last-child, :nth-child, :nth-last-child,
:first-of-type, :last-of-type, :nth-of-type, :nth-last-of-type, :only-child, :only-of-type, :empty, and :root
<https://github.com/jhy/jsoup/pull/208>
* Added a maximum body response size to Jsoup.Connection, to prevent running out of memory when trying to read
extremely large documents. The default is 1MB.
* Refactored the Cleaner to traverse rather than recurse child nodes, to avoid the risk of overflowing the stack.
<https://github.com/jhy/jsoup/issues/246>
* Added Element.insertChildren(), to easily insert a list of child nodes at a specific index.
<https://github.com/jhy/jsoup/issues/239>
* Added Node.childNodesCopy(), to create an independent copy of a Node's children.
* When parsing in XML mode, preserve XML declarations (<?xml ... ?>).
<https://github.com/jhy/jsoup/issues/242>
* Introduced Parser.parseXmlFragment(), to allow easy parsing of XML fragments.
<https://github.com/jhy/jsoup/issues/279>
* Allow Safelist test methods to be extended
<https://github.com/jhy/jsoup/issues/85>
* Added Document.OutputSettings.outline mode, to aid HTML debugging by printing out in outline mode, similar to
browser HTML inspectors.
<https://github.com/jhy/jsoup/issues/273>
* When parsing, allow all tags to self-close. Tags that aren't expected to self-close will get an end tag.
<https://github.com/jhy/jsoup/issues/258>
* Fixed an issue when parsing <textarea>/RCData tags containing unescaped closing tags that would drop the trailing >.
* Corrected the javadoc for Element#child() to note that it throws IndexOutOfBounds.
<https://github.com/jhy/jsoup/issues/277>
* When cloning an Element, reset the classnames set so as not to hold a pointer to the source's.
<https://github.com/jhy/jsoup/issues/278>
* Limit how far up the stack the formatting adoption agency algorithm will travel, to prevent the chance of a run-away
parse when the HTML stack is hopelessly deep.
<https://github.com/jhy/jsoup/issues/234>
* Modified Element.text() to build text by traversing child nodes rather than recursing. This avoids stack-overflow
errors when the DOM is very deep and the VM stack-size is low.
<https://github.com/jhy/jsoup/issues/271>
*** Release 1.7.1 [2012-Sep-23]
* Improved parse time, now 2.3x faster than previous release, with lower memory consumption.
* Reduced memory consumption when selecting elements.
* Introduced finer granularity of exceptions in Jsoup.connect, including HttpStatusException and
UnsupportedMimeTypeException.
<https://github.com/jhy/jsoup/issues/229>
* Fixed an issue when determining the Windows-1254 character-set from a meta tag when run in the Turkish locale.
<https://github.com/jhy/jsoup/issues/191>
* Fixed whitespace preservation in <textarea> tags.
<https://github.com/jhy/jsoup/issues/167>
* In jsoup.connect, fail faster if the return content type is not supported.
<https://github.com/jhy/jsoup/issues/153>
* In jsoup.clean, allow custom OutputSettings, to control pretty printing, character set, and entity escaping.
<https://github.com/jhy/jsoup/issues/148>
* Fixed an issue that prevented frameset documents to be cleaned by the Cleaner.
<https://github.com/jhy/jsoup/issues/154>
* Fixed an issue when normalising whitespace for strings containing high-surrogate characters.
<https://github.com/jhy/jsoup/issues/214>
* If a server doesn't specify a content-type header, treat that as OK.
<https://github.com/jhy/jsoup/issues/213>
* If a server returns an unsupported character-set header, attempt to decode the content with the default charset
(UTF8), instead of bailing with an unsupported charset exception.
<https://github.com/jhy/jsoup/issues/215>
* Removed an unnecessary synchronisation in Tag.valueOf, allowing multi-threaded parsing to run faster.
<https://github.com/jhy/jsoup/issues/238>
* Made entity decoding less greedy, so that non-entities are less likely to be incorrectly treated as entities.
<https://github.com/jhy/jsoup/issues/224>
* Whitespace normalise document.title() output.
<https://github.com/jhy/jsoup/issues/168>
* In Jsoup.connection, enforce a connection disconnect after every connect. This precludes keep-alive connections to
the same host, but in practise many implementations will leak connections, particularly on error.
*** Release 1.6.3 [2012-May-28]
* Fixed parsing of group-or commas in CSS selectors, to correctly handle sub-queries containing commas.
<https://github.com/jhy/jsoup/issues/179>
* If a node has no parent, return null on previousSibling and nextSibling instead of throwing a null pointer exception.
<https://github.com/jhy/jsoup/issues/184>
* Updated Node.siblingNodes() and Element.siblingElements() to exclude the current node (a node is not its own sibling).
* Fixed HTML entity parser to correctly parse entities like frac14 (letter + number combo).
<https://github.com/jhy/jsoup/issues/145>
* Fixed issue where contents of a script tag within a comment could be incorrectly parsed.
<https://github.com/jhy/jsoup/issues/115>
* Fixed GAE support: load HTML entities from a file on startup, instead of embedding in the class.
* Fixed NPE when HTML fragment parsing a <style> tag
<https://github.com/jhy/jsoup/issues/189>
* Fixed issue with :all pseudo-tag in HTML sanitizer when cleaning tags previously defined in safelist
<https://github.com/jhy/jsoup/issues/156>
* Fixed NPE in Parser.parseFragment() when context parameter is null.
<https://github.com/jhy/jsoup/issues/195>
* In HTML Safelists, when defining allowed attributes for a tag, automatically add the tag to the allowed list.
*** Release 1.6.2 [2012-Mar-27]
* Added a simplified XML parsing mode, which can usefully parse valid and invalid XML, but does not enforce any HTML
document structure or special tag behaviour.
* Added the optional ability to track errors when tokenising and parsing.
* Added jsoup.connect.cookies(Map) method, to set multiple cookies at once, possibly from a prior request.
* Added Element.textNodes() and Element.dataNodes(), to easily access an element's children text nodes and data nodes.
* Added an example program that demonstrates how to format HTML as plain-text, and the use of the NodeVisitor interface.
* Added Node.traverse() and Elements.traverse() methods, to iterate through a node's descendants.
* Updated jsoup.connect so that when requests made as POSTs are redirected, the redirect is followed as a GET.
<https://github.com/jhy/jsoup/issues/120>
* Updated the Cleaner and Safelists to optionally preserve related links in elements, instead of converting them
to absolute links.
* Updated the Cleaner to support custom allowed protocols such as "cid:" and "data:".
<https://github.com/jhy/jsoup/issues/127>
* Updated handling of <base href> tags, to act on only the first one seen when parsing, to align with modern browsers.
* Updated Node.setBaseUri(), to recursively set on all the node's descendants.
* Fixed handling of null characters within comments.
<https://github.com/jhy/jsoup/issues/121>
* Tweaked escaped entity detection in attributes to not treat &entity_... as an entity form.
<https://github.com/jhy/jsoup/issues/129>
* Fixed doctype tokeniser to allow whitespace between name and public identifier.
* Fixed issue where comments within a table tag would be duplicate-fostered into body.
<https://github.com/jhy/jsoup/pull/165>
* Fixed an issue where a spurious byte-order-mark at the start of a document would cause the parser to miss head
contents.
<https://github.com/jhy/jsoup/issues/134>
* Fixed an issue where content after a frameset could cause a NPE crash. Now correctly implements spec and ignores
the trailing content.
<https://github.com/jhy/jsoup/issues/162>
* Tweaked whitespace checks to align with HTML spec
<https://github.com/jhy/jsoup/pull/175>
* Tweaked HTML output of closing script and style tags to not add an extraneous newline when pretty-printing.
* Substantially reduced default memory allocation within Node.outerHtml, to reduce memory pressure when serialising
smaller DOMs.
<https://github.com/jhy/jsoup/issues/143>
*** Release 1.6.1 [2011-Jul-02]
* Fixed Java 1.5 compatibility.
<https://github.com/jhy/jsoup/issues/103>
* Fixed an issue when parsing <script> tags in body where the tokeniser wouldn't switch to the InScript state, which
meant that data wasn't parsed correctly.
<https://github.com/jhy/jsoup/issues/104>
* Fixed an issue with a missing quote when serialising DocumentType nodes.
<https://github.com/jhy/jsoup/issues/109>
* Fixed issue where a single 0 character was lexed incorrectly as a null character.
<https://github.com/jhy/jsoup/issues/107>
* Fixed normalisation of carriage returns to newlines on input HTML.
<https://github.com/jhy/jsoup/issues/110>
* Disabled memory mapped files when loading files from disk, to improve compatibility in Windows environments.
*** Release 1.6.0 [2011-Jun-13]
* HTML5 conformant parser. Complete reimplementation of HTML tokenisation and parsing, to implement the
http://whatwg.org/html spec. This ensures jsoup parses HTML identically to current modern browsers.
* When parsing files from disk, files are loaded via memory mapping, to increase parse speed.
* Reduced memory overhead and lowered garbage collector pressure with Attribute, Node and Element model optimisations.
* Improved "abs:" absolute URL handling in Elements.attr("abs:href") and Node.hasAttr("abs:href").
<https://github.com/jhy/jsoup/issues/97>
* Fixed cookie handling issue in jsoup.Connect where empty cookies would cause a validation exception.
<https://github.com/jhy/jsoup/issues/87>
* Added jsoup.Connect configuration options to allow HTTP errors to be ignored, and the content-type to be ignored.
Contributed by Jesse Piascik (piascikj)
<https://github.com/jhy/jsoup/pull/78>
* Added Node.before(node) and Node.after(node), to allow existing nodes to be moved, or new nodes to be inserted, into
precise DOM positions.
* Added Node.unwrap() and Elements.unwrap(), to remove a node but keep its contents. Useful for e.g. removing unwanted
formatting tags.
<https://github.com/jhy/jsoup/issues/100>
* Now handles unclosed <title> tags in document by breaking out of the title at the next start tag, instead of
eating up to the end of the document.
<https://github.com/jhy/jsoup/issues/82>
* Added OSGi bundle support to the jsoup package jar.
<https://github.com/jhy/jsoup/issues/98>
*** Release 1.5.2 [2011-Feb-27]
* Fixed issue with selector parser where some boolean AND + OR combined queries (e.g. "meta[http-equiv], meta[content]")
were being parsed incorrectly as OR only queries (e.g. former as "meta, [http-equiv], meta[content]")
* Fixed issue where a content-type specified in a meta tag may not be reliably detected, due to the above issue.
* Updated Element.text() and Element.ownText() methods to ensure <br> tags output as whitespace.
* Tweaked Element.outerHtml() method to not generate initial newline on first output element.
*** Release 1.5.1 [2011-Feb-19]
* Integrated new single-pass selector evaluators, contributed by knz (Anton Kazennikov). This significantly speeds up
the execution of combined selector queries.
* Implemented workaround to fix Scala support. Contributed by bbeck (Brandon Beck).
* Added ability to change an element's tag with Element.tagName(String), and to change many at once
with Elements.tagName(String).
* Added Node.wrap(html), Node.before(html), and Node.after(html), to allow HTML to be easily added to all nodes. These
functions were previously supported on Elements only.
* Added TextNode.splitText(index), which allows a text node to be split into two nodes at a specified index point.
This is convenient if you need to surround some text in an element.
* Updated Jsoup.Connection so that cookies set on a redirect response will be included on both the redirected request
and response.
* Infinite redirection loops in Jsoup.Connect are now prevented.
* Allow Jsoup.Connect to parse application/xml and application/xhtml+xml responses.
* Modified Jsoup.Connect to always follow relative links, regardless of the underlying HTTP sub-system.
* Defined U (underline) element as an inline tag.
* Force strict entity matching (must be &xxx; and not &xxx) in element attributes.
* Implemented clone method for Elements (contributed by knz).
* Fixed tokeniser optimisation when scanning for missing data element close tags.
* Fixed issue when using descendant regex attribute selectors.
*** Release 1.4.1 [2010-Nov-23]
* Added ability to load and parse HTML from an input stream.
* Implemented Node.clone() to create deep, independent copies of Nodes, Elements, and Documents.
* Added :not() selector, to find elements that do not match the selector. E.g. div:not(.logo) finds divs that
do not have the "logo" class name.
* Added Elements.not(selector) method, to remove undesired results from selector results.
* Implemented DataNode.setWholeData() to allow updating of script and style data contents.
* Relaxed parse rules of H1 - H6, to allow nested content. This is against spec, but matches browser and publisher
behaviour.
* Relaxed parse rule of SPAN to treat as block, to allow nested block content.
* Fixed issue in jsoup.connect when extracting character set from content-type header; now supports quoted
charset declaration.
* Fixed support for jsoup.connect to follow redirects between http & https URLs.
* Document normalisation now more enthusiastically enforces the correct document structure.
* Support node.outerHtml() method when node has no parent (e.g. when it has been removed from its DOM tree)
* Fixed support for HTML entities with numbers in name (e.g. ¾, ¹).
* Fixed absolute URL generation from relative URLs which are only query strings.
*** Release 1.3.3 [2010-Sep-19]
* Implemented Elements.empty() and Elements.remove(). This allows easy element removal, like:
doc.select("iframe").remove();
* Fixed issue in Entities when unescaping $ ("$")
<http://github.com/jhy/jsoup/issues/issue/34>
* Added restricted XHTML output entity option
<http://github.com/jhy/jsoup/issues/issue/35>
*** Release 1.3.2 [2010-Aug-30]
* Treat HTTP headers as case insensitive in Jsoup.Connection. Improves compatibility for HTTP responses.
* Improved malformed table parsing by implementing ignorable end tags.
*** Release 1.3.1 [2010-Aug-23]
* Removed dependency on Apache Commons-lang. Jsoup now has no external dependencies.
* Added new Connection implementation, to enable easier and richer HTTP requests that parse to Documents. This includes
support for gzip responses, cookies, headers, data parameters, user-agent, referrer, etc.
* Added Element.ownText() method, to get only the direct text of an element, not including the text of its children.
* Added support for selectors :containsOwn(text) and :matchesOwn(regex), to supplement Element.ownText().
* Added support for non-pretty-printed HTML output, to more closely mirror the input HTML.
* Further speed optimisations for parsing and output generation.
* Fixed support for case-sensitive HTML escape entities.
<http://github.com/jhy/jsoup/issues/issue/31>
* Fixed issue when parsing tags with keyless attributes.
<http://github.com/jhy/jsoup/issues/issue/32>
*** Release 1.2.3 [2010-Aug-04]
* Added support for automatic input character set detection and decoding. Jsoup now automatically detects the encoding
character set when parsing HTML from a File or URL. The parser checks the content-type header, then the
<meta http-equiv> or <meta charset> tag, and finally falls back to UTF-8.
* Added ability to configure the document's output charset, to control which characters are HTML escaped, and which
are kept intact. The output charset defaults to the document's input charset. This simplifies non-ascii output.
* Added full support for all new HTML5 tags.
* Added support for HTML5 dataset custom data attributes, with the Element.dataset() map.
* Added support for the [^attributePrefix] selector query, to find elements with attributes starting with a prefix.
Useful for finding elements with datasets: [^data-] matches <p data-name="jsoup">
* Added support for namespaced elements (<fb:name>) and selectors to find them (fb|name)
* Implemented Node.ownerDocument DOM method
* Improved implicit table element handling (particularly around thead, tbody, and tfoot).
* Improved HTML output format for empty elements and auto-detected self closing tags
* Changed DT & DD tags to block-mode tags, to follow practice over spec
* Added support for tag names with - and _ (<abc_foo>, <abc-foo>)
* Handle tags with internal trailing space (<foo >)
* Fixed support for character class regular expressions in [attr=~regex] selector
*** Release 1.2.2 [2010-Jul-11]
* Performance optimisation:
- core HTML parser engine now 3.5 times faster
- HTML generator now 2.5 times faster
- much lower memory use and garbage collection time
* Added support for :matches(regex) selector, to find elements containing text matching regular expression
* Added support for [key~=regex] attribute selector, to find elements with attribute values matching regular expression
* Upgraded the selector query parser to allow nested selectors like 'div:has(p:matches(regex))'
*** Release 1.2.1 [2010-Jun-21]
* Added .before(html) and .after(html) methods to Element and Elements, to insert sibling HTML
* Added :contains(text) selector, to search for elements containing the specified text
* Added :has(selector) pseudo-selector
<http://github.com/jhy/jsoup/issues/issue/20>
* Added Element#parents and Elements#parents to retrieve an element's ancestor chain
<http://github.com/jhy/jsoup/issues/issue/20>
* Fixes an issue where appending / prepending rows to a table (or to similar implicit
element structures) would create a redundant wrapping elements
<http://github.com/jhy/jsoup/issues/issue/21>
* Improved implicit close tag heuristic detection when parsing malformed HTML
* Fixes an issue where text content after a script (or other data-node) was
incorrectly added to the data node.
<http://github.com/jhy/jsoup/issues/issue/22>
* Fixes an issue where text order was incorrect when parsing pre-document
HTML.
<http://github.com/jhy/jsoup/issues/issue/23>
*** Release 1.1.1 [2010-Jun-08]
* Added selector support for :eq, :lt, and :gt
<http://github.com/jhy/jsoup/issues/issue/16>
* Added TextNode#text and TextNode#text(String)
<http://github.com/jhy/jsoup/issues/issue/18>
* Throw exception if trying to parse non-text content
<http://github.com/jhy/jsoup/issues/issue/17>
* Added Node#remove and Node#replaceWith
<http://github.com/jhy/jsoup/issues/issue/19>
* Allow _ and - in CSS ID selectors (per CSS spec).
<http://github.com/jhy/jsoup/issues/issue/10>
* Relative links are resolved to absolute when cleaning, to normalize
output and to verify safe protocol. (Were previously discarded.)
<http://github.com/jhy/jsoup/issues/issue/12>
* Allow combinators at start of selector query, for query refinements
<http://github.com/jhy/jsoup/issues/issue/13>
* Added Element#val() and #val(String) methods, for form values
<http://github.com/jhy/jsoup/issues/issue/14>
* Changed textarea contents to parse as TextNodes, not DataNodes,
so contents visible to text() (and val(), as treated as form input)
* Fixed support for Java 1.5
*** Release 0.3.1 (2010-Feb-20)
* New features: supports Elements#html(), html(String),
prepend(String), append(String); bulk methods for corresponding
methods in Element.
* New feature: Jsoup.isValid(html, safelist) method for user input
form validation.
* Improved Elements.attr(String) to find first matching element
with attribute.
* Fixed assertion error when cleaning HTML with empty attribute
<http://github.com/jhy/jsoup/issues/issue/7>
*** Release 0.2.2 (2010-Feb-07)
* jsoup packages are now available in the Maven central repository.
* New feature: supports Element#addClass, removeClass, toggleClass;
also collection class methods on Elements.
* New feature: supports Element#wrap(html) and Elements#wrap(html).
* New selector syntax: supports E + F adjacent sibling selector
* New selector syntax: supports E ~ F preceding sibling selector
* New: supports Element#elementSiblingIndex()
* Improved document normalisation.
* Improved HTML string output format (pretty-print)
* Fixed absolute URL resolution issue when a base tag has no href.
*** Release 0.1.2 (2010-Feb-02)
* Fixed unrecognised tag handler to be more permissive
<http://github.com/jhy/jsoup/issues/issue/1>
*** Release 0.1.1 (2010-Jan-31)
* Initial beta release of jsoup
================================================
FILE: pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>jsoup Java HTML Parser</name>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.22.2-SNAPSHOT</version><!-- remember to update previous version below for japicmp -->
<url>https://jsoup.org/</url>
<description>jsoup is a Java library that simplifies working with real-world HTML and XML. It offers an easy-to-use API for URL fetching, data parsing, extraction, and manipulation using DOM API methods, CSS, and xpath selectors. jsoup implements the WHATWG HTML5 specification, and parses HTML to the same DOM as modern browsers.</description>
<inceptionYear>2009</inceptionYear>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/jhy/jsoup/issues</url>
</issueManagement>
<licenses>
<license>
<name>The MIT License</name>
<url>https://jsoup.org/license</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://github.com/jhy/jsoup</url>
<connection>scm:git:https://github.com/jhy/jsoup.git</connection>
<!-- <developerConnection>scm:git:git@github.com:jhy/jsoup.git</developerConnection> -->
<tag>HEAD</tag>
</scm>
<organization>
<name>Jonathan Hedley</name>
<url>https://jhedley.com/</url>
</organization>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jetty.version>9.4.58.v20250814</jetty.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.15.0</version>
<configuration>
<encoding>UTF-8</encoding>
<useIncrementalCompilation>false</useIncrementalCompilation>
<compilerArgs>
<arg>-Xpkginfo:always</arg>
</compilerArgs>
</configuration>
<executions>
<!-- Disable the default compile, so the profiles activated below execute -->
<execution>
<id>default-compile</id>
<phase>none</phase>
</execution>
<execution>
<id>default-testCompile</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<!-- Ensure Java 8 and Android 10 API compatibility -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.27</version>
<executions>
<execution>
<id>api-java8</id>
<phase>compile</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java18</artifactId>
<version>1.0</version>
</signature>
<ignores>
<ignore>java.net.HttpURLConnection</ignore><!-- .setAuthenticator(java.net.Authenticator) in Java 9; only used in multirelease 9+ version -->
<ignore>java.net.http.*</ignore><!-- HttpClient in Java 11; only used in multirelease 11+ version -->
</ignores>
</configuration>
</execution>
<execution>
<id>api-android21</id>
<phase>compile</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<signature>
<groupId>com.toasttab.android</groupId>
<artifactId>gummy-bears-api-21</artifactId>
<version>0.10.0</version>
<!-- <classifier>coreLib2</classifier> -->
<!-- ^^ https://github.com/open-toast/gummy-bears says coreLib2 classifier for desugar should work, but I can't seem to wrangle Animal Sniffer to support that, so reverting to ignores for desugar -->
</signature>
<ignores>
<ignore>java.io.File</ignore> <!-- File#toPath() -->
<ignore>java.nio.file.*</ignore>
<ignore>java.nio.channels.SeekableByteChannel</ignore>
<ignore>java.util.function.*</ignore>
<ignore>java.util.stream.*</ignore>
<ignore>java.lang.ThreadLocal</ignore>
<ignore>java.io.UncheckedIOException</ignore>
<ignore>java.util.Comparator</ignore> <!-- Comparator.comparingInt() -->
<ignore>java.util.List</ignore> <!-- List#stream() -->
<ignore>java.util.ArrayList</ignore> <!-- List / ArrayList #sort() -->
<ignore>java.util.LinkedHashMap</ignore> <!-- LinkedHashMap#computeIfAbsent() -->
<ignore>java.util.Map</ignore> <!-- Map#computeIfAbsent() -->
<ignore>java.util.Objects</ignore>
<ignore>java.util.Optional</ignore>
<ignore>java.util.Set</ignore> <!-- Set#stream() -->
<ignore>java.util.Spliterator</ignore>
<ignore>java.util.Spliterators</ignore>
<ignore>java.nio.ByteBuffer</ignore> <!-- .flip(); added in API1; possibly due to .flip previously returning Buffer, later ByteBuffer; return unused -->
<ignore>java.net.HttpURLConnection</ignore><!-- .setAuthenticator(java.net.Authenticator) in Java 9; only used in multirelease 9+ version -->
<!-- HttpClient and following in Java 11; only used in multirelease 11+ version, guarded and not on Android -->
<ignore>java.net.http.*</ignore>
<ignore>java.time.Duration</ignore>
<ignore>java.util.OptionalLong</ignore>
</ignores>
<!-- ^ Provided by https://developer.android.com/studio/write/java8-support#library-desugaring -->
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.12.0</version>
<configuration>
<doclint>none</doclint>
<source>8</source>
<linksource>true</linksource>
</configuration>
<executions>
<execution>
<id>attach-javadoc</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.4.0</version>
<configuration>
<excludes>
<exclude>org/jsoup/examples/**</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
<executions>
<execution>
<id>default-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<excludes>
<exclude>org/jsoup/examples/**</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>jar-examples</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>examples</classifier>
<includes>
<include>org/jsoup/**</include>
<include>org/jsoup/examples/**</include>
</includes>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<mainClass>org.jsoup.examples.HtmlToPlainText</mainClass>
</manifest>
</archive>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.9</version>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
<configuration>
<instructions>
<Bundle-DocURL>https://jsoup.org/</Bundle-DocURL>
<Export-Package>org.jsoup.*</Export-Package>
<Import-Package>!org.jsoup.*,org.jspecify.annotations;version=!;resolution:=optional,*</Import-Package>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.4.0</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>3.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.5</version>
<configuration>
<!-- smaller stack to find stack overflows. Was 256, but Zulu on MacOS ARM needs >= 640 -->
<argLine>-Xss640k</argLine>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.5.5</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<parallel>methods</parallel>
<threadCount>8</threadCount>
</configuration>
</plugin>
<plugin>
<!-- API version compat check - https://siom79.github.io/japicmp/ -->
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
<version>0.25.4</version>
<configuration>
<!-- hard code previous version; can't detect when running stateless on build server -->
<oldVersion>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.21.2</version>
<type>jar</type>
</dependency>
</oldVersion>
<parameter>
<!-- jsoup policy is ok to remove deprecated methods on minor but not builds. will need to temp remove on bump to 1.15.1 and manually validate -->
<onlyModified>false</onlyModified>
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
<breakBuildOnSourceIncompatibleModifications>true</breakBuildOnSourceIncompatibleModifications>
<excludes />
<overrideCompatibilityChangeParameters>
<!-- allows new default and move to default methods. compatible as long as existing binaries aren't making calls via reflection. if so, they need to catch errors anyway. -->
<overrideCompatibilityChangeParameter>
<compatibilityChange>METHOD_NEW_DEFAULT</compatibilityChange>
<binaryCompatible>true</binaryCompatible>
<sourceCompatible>true</sourceCompatible>
</overrideCompatibilityChangeParameter>
<overrideCompatibilityChangeParameter>
<compatibilityChange>METHOD_ABSTRACT_NOW_DEFAULT</compatibilityChange>
<binaryCompatible>true</binaryCompatible>
<sourceCompatible>true</sourceCompatible>
</overrideCompatibilityChangeParameter>
</overrideCompatibilityChangeParameters>
</parameter>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>cmp</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.10.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>./</directory>
<targetPath>META-INF/jsoup/</targetPath>
<filtering>false</filtering>
<includes>
<include>LICENSE</include>
</includes>
</resource>
</resources>
</build>
<profiles>
<!-- Profile for Java 8 -->
<profile>
<id>java-8</id>
<activation>
<jdk>1.8</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- Compiles the multi-release jar when executed on JDK11+ -->
<profile>
<id>compile-multi-release</id>
<activation>
<jdk>[11,2000)</jdk>
</activation>
<build>
<plugins>
<!-- Sets up test/java11 -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.6.1</version>
<executions>
<execution>
<id>add-java11-test-source</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${project.basedir}/src/test/java11</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>compile-java-8</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>8</release>
</configuration>
</execution>
<execution>
<id>testCompile-java-11</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<useModulePath>false</useModulePath>
<release>11</release>
</configuration>
</execution>
<execution>
<id>compile-java-11</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>11</release>
<compileSourceRoots>
<compileSourceRoot>${project.basedir}/src/main/java11</compileSourceRoot>
</compileSourceRoots>
<multiReleaseOutput>true</multiReleaseOutput>
</configuration>
</execution>
</executions>
</plugin>
<!-- Add the Java 11-specific test directory to the test runtime classpath -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<additionalClasspathElements>
<additionalClasspathElement>${project.build.outputDirectory}/META-INF/versions/11</additionalClasspathElement>
</additionalClasspathElements>
<useModulePath>false</useModulePath> <!-- tests use classpath -->
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release-sign-artifacts</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>package</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>failsafe</id>
<build>
<plugins>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.5.5</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<!-- junit -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.14.3</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- gson, to fetch entities from w3.org -->
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- jetty for webserver integration tests. 9.x is last with Java7 support -->
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>${jetty.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- jetty for webserver integration tests -->
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>${jetty.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- jetty proxy, for integration tests -->
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-proxy</artifactId>
<version>${jetty.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- org.jspecify.annotations.nonnull, with Apache 2 license. Build time only. -->
<groupId>org.jspecify</groupId>
<artifactId>jspecify</artifactId>
<version>1.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<!-- re2j; linear time regex, with 3-clause BSD license -->
<groupId>com.google.re2j</groupId>
<artifactId>re2j</artifactId>
<version>1.8</version>
<optional>true</optional>
<scope>compile</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
</dependencies>
</dependencyManagement>
<developers>
<developer>
<id>jhy</id>
<name>Jonathan Hedley</name>
<email>jonathan@hedley.net</email>
<roles>
<role>Lead Developer</role>
</roles>
<timezone>+11</timezone>
</developer>
</developers>
</project>
================================================
FILE: src/main/java/org/jsoup/Connection.java
================================================
package org.jsoup;
import org.jsoup.helper.RequestAuthenticator;
import org.jsoup.nodes.Document;
import org.jsoup.parser.Parser;
import org.jsoup.parser.StreamParser;
import org.jspecify.annotations.Nullable;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UncheckedIOException;
import java.net.Authenticator;
import java.net.CookieStore;
import java.net.Proxy;
import java.net.URL;
import java.util.Collection;
import java.util.List;
import java.util.Map;
/**
The Connection interface is a convenient HTTP client and session object to fetch content from the web, and parse them
into Documents.
<p>To start a new session, use either {@link org.jsoup.Jsoup#newSession()} or {@link org.jsoup.Jsoup#connect(String)}.
Connections contain {@link Connection.Request} and {@link Connection.Response} objects (once executed). Configuration
settings (URL, timeout, useragent, etc) set on a session will be applied by default to each subsequent request.</p>
<p>To start a new request from the session, use {@link #newRequest()}.</p>
<p>Cookies are stored in memory for the duration of the session. For that reason, do not use one single session for all
requests in a long-lived application, or you are likely to run out of memory, unless care is taken to clean up the
cookie store. The cookie store for the session is available via {@link #cookieStore()}. You may provide your own
implementation via {@link #cookieStore(java.net.CookieStore)} before making requests.</p>
<p>Request configuration can be made using either the shortcut methods in Connection (e.g. {@link #userAgent(String)}),
or by methods in the {@link Connection.Request} object directly. All request configuration must be made before the request is
executed. When used as an ongoing session, initialize all defaults prior to making multi-threaded {@link
#newRequest()}s.</p>
<p>Note that the term "Connection" used here does not mean that a long-lived connection is held against a server for
the lifetime of the Connection object. A socket connection is only made at the point of request execution ({@link
#execute()}, {@link #get()}, or {@link #post()}), and the server's response consumed.</p>
<p>For multi-threaded implementations, it is important to use a {@link #newRequest()} for each request. The session may
be shared across concurrent threads, but a not a specific request.</p>
<p><b>HTTP/2</b> support: On JVM 11 and above, requests use {@link java.net.http.HttpClient}, which supports
HTTP/2. To use the legacy {@link java.net.HttpURLConnection} instead, set
<code>System.setProperty("jsoup.useHttpClient", "false")</code>.</p>
*/
@SuppressWarnings("unused")
public interface Connection {
/**
* GET and POST http methods.
*/
enum Method {
GET(false),
POST(true),
PUT(true),
DELETE(true),
/**
Note that unfortunately, PATCH is not supported in many JDKs.
*/
PATCH(true),
HEAD(false),
OPTIONS(false),
TRACE(false);
private final boolean hasBody;
Method(boolean hasBody) {
this.hasBody = hasBody;
}
/**
* Check if this HTTP method has/needs a request body
* @return if body needed
*/
public final boolean hasBody() {
return hasBody;
}
}
/**
Creates a new request, using this Connection as the session-state and to initialize the connection settings (which
may then be independently changed on the returned {@link Connection.Request} object).
@return a new Connection object, with a shared Cookie Store and initialized settings from this Connection and Request
@since 1.14.1
*/
Connection newRequest();
/**
Creates a new request, using this Connection as the session-state and to initialize the connection settings (which
may then be independently changed on the returned {@link Connection.Request} object).
@return a new Connection object, with a shared Cookie Store and initialized settings from this Connection and Request
@param url URL for the new request
@since 1.17.1
*/
default Connection newRequest(String url) {
return newRequest().url(url);
}
/**
Creates a new request, using this Connection as the session-state and to initialize the connection settings (which
may then be independently changed on the returned {@link Connection.Request} object).
@return a new Connection object, with a shared Cookie Store and initialized settings from this Connection and Request
@param url URL for the new request
@since 1.17.1
*/
default Connection newRequest(URL url) {
return newRequest().url(url);
}
/**
* Set the request URL to fetch. The protocol must be HTTP or HTTPS.
* @param url URL to connect to
* @return this Connection, for chaining
*/
Connection url(URL url);
/**
* Set the request URL to fetch. The protocol must be HTTP or HTTPS.
* @param url URL to connect to
* @return this Connection, for chaining
*/
Connection url(String url);
/**
* Set the proxy to use for this request. Set to <code>null</code> to disable a previously set proxy.
* @param proxy proxy to use
* @return this Connection, for chaining
*/
Connection proxy(@Nullable Proxy proxy);
/**
* Set the HTTP proxy to use for this request.
* @param host the proxy hostname
* @param port the proxy port
* @return this Connection, for chaining
*/
Connection proxy(String host, int port);
/**
* Set the request user-agent header.
* @param userAgent user-agent to use
* @return this Connection, for chaining
* @see org.jsoup.helper.HttpConnection#DEFAULT_UA
*/
Connection userAgent(String userAgent);
/**
Set the total maximum request duration. If a timeout occurs, an {@link java.net.SocketTimeoutException} will be
thrown.
<p>The default timeout is <b>30 seconds</b> (30,000 millis). A timeout of zero is treated as an infinite timeout.</p>
<p>This timeout specifies the combined maximum duration of the connection time and the time to read
the full response.</p>
<p>Implementation note: when this <code>Connection</code> is backed by <code>HttpURLConnection</code> (rather than <code>HttpClient</code>, as used in JVM 11+), this timeout is implemented by setting both the socket connect and read timeouts to half of the specified value.</p>
@param millis number of milliseconds (thousandths of a second) before timing out connects or reads.
@return this Connection, for chaining
@see #maxBodySize(int)
*/
Connection timeout(int millis);
/**
* Set the maximum bytes to read from the (uncompressed) connection into the body, before the connection is closed,
* and the input truncated (i.e. the body content will be trimmed). <b>The default maximum is 2MB</b>. A max size of
* <code>0</code> is treated as an infinite amount (bounded only by your patience and the memory available on your
* machine).
*
* @param bytes number of bytes to read from the input before truncating
* @return this Connection, for chaining
*/
Connection maxBodySize(int bytes);
/**
* Set the request referrer (aka "referer") header.
* @param referrer referrer to use
* @return this Connection, for chaining
*/
Connection referrer(String referrer);
/**
* Configures the connection to (not) follow server redirects. By default, this is <b>true</b>.
* @param followRedirects true if server redirects should be followed.
* @return this Connection, for chaining
*/
Connection followRedirects(boolean followRedirects);
/**
* Set the request method to use, GET or POST. Default is GET.
* @param method HTTP request method
* @return this Connection, for chaining
*/
Connection method(Method method);
/**
* Configures the connection to not throw exceptions when an HTTP error occurs. (4xx - 5xx, e.g. 404 or 500). By
* default, this is <b>false</b>; an IOException is thrown if an error is encountered. If set to <b>true</b>, the
* response is populated with the error body, and the status message will reflect the error.
* @param ignoreHttpErrors - false (default) if HTTP errors should be ignored.
* @return this Connection, for chaining
*/
Connection ignoreHttpErrors(boolean ignoreHttpErrors);
/**
* Ignore the document's Content-Type when parsing the response. By default, this is <b>false</b>, an unrecognised
* content-type will cause an IOException to be thrown. (This is to prevent producing garbage by attempting to parse
* a JPEG binary image, for example.) Set to true to force a parse attempt regardless of content type.
* @param ignoreContentType set to true if you would like the content type ignored on parsing the response into a
* Document.
* @return this Connection, for chaining
*/
Connection ignoreContentType(boolean ignoreContentType);
/**
Set a custom SSL socket factory for HTTPS connections.
<p>Note: if set, the legacy <code>HttpURLConnection</code> will be used instead of the JVM's
<code>HttpClient</code>.</p>
@param sslSocketFactory SSL socket factory
@return this Connection, for chaining
@see #sslContext(SSLContext)
@deprecated use {@link #sslContext(SSLContext)} instead; will be removed in jsoup 1.24.1.
*/
@Deprecated
Connection sslSocketFactory(SSLSocketFactory sslSocketFactory);
/**
Set a custom SSL context for HTTPS connections.
<p>Note: when using the legacy <code>HttpURLConnection</code>, only the <code>SSLSocketFactory</code> from the
context will be used.</p>
@param sslContext SSL context
@return this Connection, for chaining
@since 1.21.2
*/
default Connection sslContext(SSLContext sslContext) {
throw new UnsupportedOperationException();
}
/**
* Add a request data parameter. Request parameters are sent in the request query string for GETs, and in the
* request body for POSTs. A request may have multiple values of the same name.
* @param key data key
* @param value data value
* @return this Connection, for chaining
*/
Connection data(String key, String value);
/**
* Add an input stream as a request data parameter. For GETs, has no effect, but for POSTS this will upload the
* input stream.
* <p>Use the {@link #data(String, String, InputStream, String)} method to set the uploaded file's mimetype.</p>
* @param key data key (form item name)
* @param filename the name of the file to present to the remove server. Typically just the name, not path,
* component.
* @param inputStream the input stream to upload, that you probably obtained from a {@link java.io.FileInputStream}.
* You must close the InputStream in a {@code finally} block.
* @return this Connection, for chaining
* @see #data(String, String, InputStream, String)
*/
Connection data(String key, String filename, InputStream inputStream);
/**
* Add an input stream as a request data parameter. For GETs, has no effect, but for POSTS this will upload the
* input stream.
* @param key data key (form item name)
* @param filename the name of the file to present to the remove server. Typically just the name, not path,
* component.
* @param inputStream the input stream to upload, that you probably obtained from a {@link java.io.FileInputStream}.
* @param contentType the Content Type (aka mimetype) to specify for this file.
* You must close the InputStream in a {@code finally} block.
* @return this Connection, for chaining
*/
Connection data(String key, String filename, InputStream inputStream, String contentType);
/**
* Adds all of the supplied data to the request data parameters
* @param data collection of data parameters
* @return this Connection, for chaining
*/
Connection data(Collection<KeyVal> data);
/**
* Adds all of the supplied data to the request data parameters
* @param data map of data parameters
* @return this Connection, for chaining
*/
Connection data(Map<String, String> data);
/**
Add one or more request {@code key, val} data parameter pairs.
<p>Multiple parameters may be set at once, e.g.:
<code>.data("name", "jsoup", "language", "Java", "language", "English");</code> creates a query string like:
<code>{@literal ?name=jsoup&language=Java&language=English}</code></p>
<p>For GET requests, data parameters will be sent on the request query string. For POST (and other methods that
contain a body), they will be sent as body form parameters, unless the body is explicitly set by
{@link #requestBody(String)}, in which case they will be query string parameters.</p>
@param keyvals a set of key value pairs.
@return this Connection, for chaining
*/
Connection data(String... keyvals);
/**
* Get the data KeyVal for this key, if any
* @param key the data key
* @return null if not set
*/
@Nullable KeyVal data(String key);
/**
* Set a POST (or PUT) request body. Useful when a server expects a plain request body (such as JSON), and not a set
* of URL encoded form key/value pairs. E.g.:
* <code><pre>Jsoup.connect(url)
* .requestBody(json)
* .header("Content-Type", "application/json")
* .post();</pre></code>
* If any data key/vals are supplied, they will be sent as URL query params.
* @see #requestBodyStream(InputStream)
* @return this Request, for chaining
*/
Connection requestBody(String body);
/**
Set the request body. Useful for posting data such as byte arrays or files, and the server expects a single request
body (and not a multipart upload). E.g.:
<code><pre> Jsoup.connect(url)
.requestBody(new ByteArrayInputStream(bytes))
.header("Content-Type", "application/octet-stream")
.post();
</pre></code>
<p>Or, use a FileInputStream to data from disk.</p>
<p>You should close the stream in a finally block.</p>
@param stream the input stream to send.
@return this Request, for chaining
@see #requestBody(String)
@since 1.20.1
*/
default Connection requestBodyStream(InputStream stream) {
throw new UnsupportedOperationException();
}
/**
* Set a request header. Replaces any existing header with the same case-insensitive name.
* @param name header name
* @param value header value
* @return this Connection, for chaining
* @see org.jsoup.Connection.Request#header(String, String)
* @see org.jsoup.Connection.Request#headers()
*/
Connection header(String name, String value);
/**
* Sets each of the supplied headers on the request. Existing headers with the same case-insensitive name will be
* replaced with the new value.
* @param headers map of headers name {@literal ->} value pairs
* @return this Connection, for chaining
* @see org.jsoup.Connection.Request#headers()
*/
Connection headers(Map<String,String> headers);
/**
* Set a cookie to be sent in the request.
* @param name name of cookie
* @param value value of cookie
* @return this Connection, for chaining
*/
Connection cookie(String name, String value);
/**
* Adds each of the supplied cookies to the request.
* @param cookies map of cookie name {@literal ->} value pairs
* @return this Connection, for chaining
*/
Connection cookies(Map<String, String> cookies);
/**
Provide a custom or pre-filled CookieStore to be used on requests made by this Connection.
@param cookieStore a cookie store to use for subsequent requests
@return this Connection, for chaining
@since 1.14.1
*/
Connection cookieStore(CookieStore cookieStore);
/**
Get the cookie store used by this Connection.
@return the cookie store
@since 1.14.1
*/
CookieStore cookieStore();
/**
* Provide a specific parser to use when parsing the response to a Document. If not set, jsoup defaults to the
* {@link Parser#htmlParser() HTML parser}, unless the response content-type is XML, in which case the
* {@link Parser#xmlParser() XML parser} is used.
* @param parser alternate parser
* @return this Connection, for chaining
*/
Connection parser(Parser parser);
/**
* Set the character-set used to encode the request body. Defaults to {@code UTF-8}.
* @param charset character set to encode the request body
* @return this Connection, for chaining
*/
Connection postDataCharset(String charset);
/**
Set the authenticator to use for this connection, enabling requests to URLs, and via proxies, that require
authentication credentials.
<p>The authentication scheme used is automatically detected during the request execution.
Supported schemes (subject to the platform) are {@code basic}, {@code digest}, {@code NTLM},
and {@code Kerberos}.</p>
<p>To use, supply a {@link RequestAuthenticator} function that:
<ol>
<li>validates the URL that is requesting authentication, and</li>
<li>returns the appropriate credentials (username and password)</li>
</ol>
</p>
<p>For example, to authenticate both to a proxy and a downstream web server:
<code><pre>
Connection session = Jsoup.newSession()
.proxy("proxy.example.com", 8080)
.auth(auth -> {
if (auth.isServer()) { // provide credentials for the request url
Validate.isTrue(auth.url().getHost().equals("example.com"));
// check that we're sending credentials were we expect, and not redirected out
return auth.credentials("username", "password");
} else { // auth.isProxy()
return auth.credentials("proxy-user", "proxy-password");
}
});
Connection.Response response = session.newRequest("https://example.com/adminzone/").execute();
</pre></code>
</p>
<p>The system may cache the authentication and use it for subsequent requests to the same resource.</p>
<p><b>Implementation notes</b></p>
<p>For compatibility, on a Java 8 platform, authentication is set up via the system-wide default
{@link java.net.Authenticator#setDefault(Authenticator)} method via a ThreadLocal delegator. Whilst the
authenticator used is request specific and thread-safe, if you have other calls to {@code setDefault}, they will be
incompatible with this implementation.</p>
<p>On Java 9 and above, the preceding note does not apply; authenticators are directly set on the request. </p>
<p>If you are attempting to authenticate to a proxy that uses the {@code basic} scheme and will be fetching HTTPS
URLs, you need to configure your Java platform to enable that, by setting the
{@code jdk.http.auth.tunneling.disabledSchemes} system property to {@code ""}.
This must be executed prior to any authorization attempts. E.g.:
<code><pre>
static {
System.setProperty("jdk.http.auth.tunneling.disabledSchemes", "");
// removes Basic, which is otherwise excluded from auth for CONNECT tunnels
}</pre></code>
</p>
* @param authenticator the authenticator to use in this connection
* @return this Connection, for chaining
* @since 1.17.1
*/
default Connection auth(@Nullable RequestAuthenticator authenticator) {
throw new UnsupportedOperationException();
}
/**
* Execute the request as a GET, and parse the result.
* @return parsed Document
* @throws java.net.MalformedURLException if the request URL is not an HTTP or HTTPS URL, or is otherwise malformed
* @throws HttpStatusException if the response is not OK and HTTP response errors are not ignored
* @throws UnsupportedMimeTypeException if the response mime type is not supported and those errors are not ignored
* @throws java.net.SocketTimeoutException if the connection times out
* @throws IOException on error
*/
Document get() throws IOException;
/**
* Execute the request as a POST, and parse the result.
* @return parsed Document
* @throws java.net.MalformedURLException if the request URL is not a HTTP or HTTPS URL, or is otherwise malformed
* @throws HttpStatusException if the response is not OK and HTTP response errors are not ignored
* @throws UnsupportedMimeTypeException if the response mime type is not supported and those errors are not ignored
* @throws java.net.SocketTimeoutException if the connection times out
* @throws IOException on error
*/
Document post() throws IOException;
/**
* Execute the request.
* @return the executed {@link Response}
* @throws java.net.MalformedURLException if the request URL is not a HTTP or HTTPS URL, or is otherwise malformed
* @throws HttpStatusException if the response is not OK and HTTP response errors are not ignored
* @throws UnsupportedMimeTypeException if the response mime type is not supported and those errors are not ignored
* @throws java.net.SocketTimeoutException if the connection times out
* @throws IOException on error
*/
Response execute() throws IOException;
/**
* Get the request object associated with this connection
* @return request
*/
Request request();
/**
* Set the connection's request
* @param request new request object
* @return this Connection, for chaining
*/
Connection request(Request request);
/**
* Get the response, once the request has been executed.
* @return response
* @throws IllegalArgumentException if called before the response has been executed.
*/
Response response();
/**
* Set the connection's response
* @param response new response
* @return this Connection, for chaining
*/
Connection response(Response response);
/**
Set the response progress handler, which will be called periodically as the response body is downloaded. Since
documents are parsed as they are downloaded, this is also a good proxy for the parse progress.
<p>The Response object is supplied as the progress context, and may be read from to obtain headers etc.</p>
@param handler the progress handler
@return this Connection, for chaining
@since 1.18.1
*/
default Connection onResponseProgress(Progress<Response> handler) {
throw new UnsupportedOperationException();
}
/**
* Common methods for Requests and Responses
* @param <T> Type of Base, either Request or Response
*/
@SuppressWarnings("UnusedReturnValue")
interface Base<T extends Base<T>> {
/**
* Get the URL of this Request or Response. For redirected responses, this will be the final destination URL.
* @return URL
* @throws IllegalArgumentException if called on a Request that was created without a URL.
*/
URL url();
/**
* Set the URL
* @param url new URL
* @return this, for chaining
*/
T url(URL url);
/**
* Get the request method, which defaults to <code>GET</code>
* @return method
*/
Method method();
/**
* Set the request method
* @param method new method
* @return this, for chaining
*/
T method(Method method);
/**
* Get the value of a header. If there is more than one header value with the same name, the headers are returned
* comma separated, per <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2">rfc2616-sec4</a>.
* <p>
* Header names are case-insensitive.
* </p>
* @param name name of header (case-insensitive)
* @return value of header, or null if not set.
* @see #hasHeader(String)
* @see #cookie(String)
*/
@Nullable String header(String name);
/**
* Get the values of a header.
* @param name header name, case-insensitive.
* @return a list of values for this header, or an empty list if not set.
*/
List<String> headers(String name);
/**
* Set a header. This method will overwrite any existing header with the same case-insensitive name. If there
* is more than one value for this header, this method will update the first matching header.
* <p>For compatibility, if the content of the header includes text that cannot be represented by ISO-8859-1,
* then it should be encoded first per <a href="https://www.ietf.org/rfc/rfc2047.txt">RFC 2047</a>.</p>
* @param name Name of header
* @param value Value of header
* @return this, for chaining
* @see #addHeader(String, String)
*/
T header(String name, String value);
/**
* Add a header. The header will be added regardless of whether a header with the same name already exists.
* <p>For compatibility, if the content of the header includes text that cannot be represented by ISO-8859-1,
* then it should be encoded first per <a href="https://www.ietf.org/rfc/rfc2047.txt">RFC 2047</a>.</p>
* @param name Name of new header
* @param value Value of new header
* @return this, for chaining
*/
T addHeader(String name, String value);
/**
* Check if a header is present
* @param name name of header (case-insensitive)
* @return if the header is present in this request/response
*/
boolean hasHeader(String name);
/**
* Check if a header is present, with the given value
* @param name header name (case-insensitive)
* @param value value (case-insensitive)
* @return if the header and value pair are set in this req/res
*/
boolean hasHeaderWithValue(String name, String value);
/**
* Remove headers by name. If there is more than one header with this name, they will all be removed.
* @param name name of header to remove (case-insensitive)
* @return this, for chaining
*/
T removeHeader(String name);
/**
* Retrieve all of the request/response header names and corresponding values as a map. For headers with multiple
* values, only the first header is returned.
* <p>Note that this is a view of the headers only, and changes made to this map will not be reflected in the
* request/response object.</p>
* @return headers
* @see #multiHeaders()
*/
Map<String, String> headers();
/**
* Retreive all of the headers, keyed by the header name, and with a list of values per header.
* @return a list of multiple values per header.
*/
Map<String, List<String>> multiHeaders();
/**
* Get a cookie value by name from this request/response.
* @param name name of cookie to retrieve.
* @return value of cookie, or null if not set
*/
@Nullable String cookie(String name);
/**
* Set a cookie in this request/response.
* @param name name of cookie
* @param value value of cookie
* @return this, for chaining
*/
T cookie(String name, String value);
/**
* Check if a cookie is present
* @param name name of cookie
* @return if the cookie is present in this request/response
*/
boolean hasCookie(String name);
/**
* Remove a cookie by name
* @param name name of cookie to remove
* @return this, for chaining
*/
T removeCookie(String name);
/**
Retrieve the request/response cookies as a map. For response cookies, if duplicate cookie names were sent, the
last one set will be the one included. For session management, rather than using these response cookies, prefer
to use {@link Jsoup#newSession()} and related methods.
@return simple cookie map
@see #cookieStore()
*/
Map<String, String> cookies();
}
/**
* Represents a HTTP request.
*/
@SuppressWarnings("UnusedReturnValue")
interface Request extends Base<Request>
gitextract_knobfku8/
├── .gitattributes
├── .github/
│ ├── dependabot.yml
│ └── workflows/
│ ├── build.yml
│ ├── cifuzz.yml
│ └── codeql.yml
├── .gitignore
├── CHANGES.md
├── LICENSE
├── README.md
├── SECURITY.md
├── change-archive.txt
├── pom.xml
└── src/
├── main/
│ ├── java/
│ │ └── org/
│ │ └── jsoup/
│ │ ├── Connection.java
│ │ ├── HttpStatusException.java
│ │ ├── Jsoup.java
│ │ ├── Progress.java
│ │ ├── SerializationException.java
│ │ ├── UnsupportedMimeTypeException.java
│ │ ├── examples/
│ │ │ ├── HtmlToPlainText.java
│ │ │ ├── ListLinks.java
│ │ │ ├── Wikipedia.java
│ │ │ └── package-info.java
│ │ ├── helper/
│ │ │ ├── AuthenticationHandler.java
│ │ │ ├── CookieUtil.java
│ │ │ ├── DataUtil.java
│ │ │ ├── HttpConnection.java
│ │ │ ├── Re2jRegex.java
│ │ │ ├── Regex.java
│ │ │ ├── RequestAuthenticator.java
│ │ │ ├── RequestDispatch.java
│ │ │ ├── RequestExecutor.java
│ │ │ ├── UrlBuilder.java
│ │ │ ├── UrlConnectionExecutor.java
│ │ │ ├── Validate.java
│ │ │ ├── ValidationException.java
│ │ │ ├── W3CDom.java
│ │ │ └── package-info.java
│ │ ├── internal/
│ │ │ ├── ControllableInputStream.java
│ │ │ ├── Functions.java
│ │ │ ├── Normalizer.java
│ │ │ ├── QuietAppendable.java
│ │ │ ├── SharedConstants.java
│ │ │ ├── SimpleBufferedInput.java
│ │ │ ├── SimpleStreamReader.java
│ │ │ ├── SoftPool.java
│ │ │ ├── StringUtil.java
│ │ │ └── package-info.java
│ │ ├── nodes/
│ │ │ ├── Attribute.java
│ │ │ ├── Attributes.java
│ │ │ ├── CDataNode.java
│ │ │ ├── Comment.java
│ │ │ ├── DataNode.java
│ │ │ ├── Document.java
│ │ │ ├── DocumentType.java
│ │ │ ├── Element.java
│ │ │ ├── Entities.java
│ │ │ ├── EntitiesData.java
│ │ │ ├── FormElement.java
│ │ │ ├── LeafNode.java
│ │ │ ├── Node.java
│ │ │ ├── NodeIterator.java
│ │ │ ├── NodeUtils.java
│ │ │ ├── Printer.java
│ │ │ ├── PseudoTextElement.java
│ │ │ ├── Range.java
│ │ │ ├── TextNode.java
│ │ │ ├── XmlDeclaration.java
│ │ │ └── package-info.java
│ │ ├── package-info.java
│ │ ├── parser/
│ │ │ ├── CharacterReader.java
│ │ │ ├── HtmlTreeBuilder.java
│ │ │ ├── HtmlTreeBuilderState.java
│ │ │ ├── ParseError.java
│ │ │ ├── ParseErrorList.java
│ │ │ ├── ParseSettings.java
│ │ │ ├── Parser.java
│ │ │ ├── StreamParser.java
│ │ │ ├── Tag.java
│ │ │ ├── TagSet.java
│ │ │ ├── Token.java
│ │ │ ├── TokenData.java
│ │ │ ├── TokenQueue.java
│ │ │ ├── Tokeniser.java
│ │ │ ├── TokeniserState.java
│ │ │ ├── TreeBuilder.java
│ │ │ ├── XmlTreeBuilder.java
│ │ │ └── package-info.java
│ │ ├── safety/
│ │ │ ├── Cleaner.java
│ │ │ ├── Safelist.java
│ │ │ └── package-info.java
│ │ └── select/
│ │ ├── Collector.java
│ │ ├── CombiningEvaluator.java
│ │ ├── Elements.java
│ │ ├── Evaluator.java
│ │ ├── NodeEvaluator.java
│ │ ├── NodeFilter.java
│ │ ├── NodeTraversor.java
│ │ ├── NodeVisitor.java
│ │ ├── Nodes.java
│ │ ├── QueryParser.java
│ │ ├── Selector.java
│ │ ├── StructuralEvaluator.java
│ │ └── package-info.java
│ ├── java11/
│ │ ├── module-info.java
│ │ └── org/
│ │ └── jsoup/
│ │ └── helper/
│ │ ├── HttpClientExecutor.java
│ │ └── RequestAuthHandler.java
│ ├── javadoc/
│ │ └── overview.html
│ └── resources/
│ └── META-INF/
│ └── proguard/
│ └── org.jsoup_jsoup.pro
└── test/
├── java/
│ └── org/
│ └── jsoup/
│ ├── JsoupTest.java
│ ├── MultiLocaleExtension.java
│ ├── SerializationExceptionTest.java
│ ├── TextUtil.java
│ ├── helper/
│ │ ├── AuthenticationHandlerTest.java
│ │ ├── CookieUtilTest.java
│ │ ├── DataUtilTest.java
│ │ ├── HttpConnectionTest.java
│ │ ├── RegexTest.java
│ │ ├── ValidateTest.java
│ │ └── W3CDomTest.java
│ ├── integration/
│ │ ├── Benchmark.java
│ │ ├── ConnectIT.java
│ │ ├── ConnectTest.java
│ │ ├── FuzzFixesIT.java
│ │ ├── FuzzFixesTest.java
│ │ ├── ParseTest.java
│ │ ├── ProxyTest.java
│ │ ├── SafelistExtensionTest.java
│ │ ├── SessionIT.java
│ │ ├── SessionTest.java
│ │ ├── TestServer.java
│ │ └── servlets/
│ │ ├── AuthFilter.java
│ │ ├── BaseServlet.java
│ │ ├── CookieServlet.java
│ │ ├── DeflateServlet.java
│ │ ├── EchoServlet.java
│ │ ├── FileServlet.java
│ │ ├── HelloServlet.java
│ │ ├── InterruptedServlet.java
│ │ ├── ProxyServlet.java
│ │ ├── RedirectServlet.java
│ │ └── SlowRider.java
│ ├── internal/
│ │ ├── ControllableInputStreamTest.java
│ │ ├── QuietAppendableTest.java
│ │ ├── ReaderTest.java
│ │ ├── SoftPoolTest.java
│ │ └── StringUtilTest.java
│ ├── nodes/
│ │ ├── AttributeTest.java
│ │ ├── AttributesTest.java
│ │ ├── BuildEntities.java
│ │ ├── CommentTest.java
│ │ ├── DataNodeTest.java
│ │ ├── DocumentTest.java
│ │ ├── DocumentTypeTest.java
│ │ ├── ElementIT.java
│ │ ├── ElementTest.java
│ │ ├── EntitiesTest.java
│ │ ├── FormElementTest.java
│ │ ├── LeafNodeTest.java
│ │ ├── NodeIteratorTest.java
│ │ ├── NodeStreamTest.java
│ │ ├── NodeTest.java
│ │ ├── PrinterTest.java
│ │ └── TextNodeTest.java
│ ├── parser/
│ │ ├── AttributeParseTest.java
│ │ ├── CharacterReaderTest.java
│ │ ├── HtmlParserTest.java
│ │ ├── HtmlTreeBuilderStateTest.java
│ │ ├── HtmlTreeBuilderTest.java
│ │ ├── ParserIT.java
│ │ ├── ParserSettingsTest.java
│ │ ├── ParserTest.java
│ │ ├── PositionTest.java
│ │ ├── StreamParserTest.java
│ │ ├── TagSetTest.java
│ │ ├── TagTest.java
│ │ ├── TokenQueueTest.java
│ │ ├── TokeniserStateTest.java
│ │ ├── TokeniserTest.java
│ │ └── XmlTreeBuilderTest.java
│ ├── safety/
│ │ ├── CleanerTest.java
│ │ └── SafelistTest.java
│ └── select/
│ ├── CssTest.java
│ ├── ElementsTest.java
│ ├── EvaluatorDebug.java
│ ├── EvaluatorTest.java
│ ├── NodesTest.java
│ ├── QueryParserTest.java
│ ├── SelectorIT.java
│ ├── SelectorTest.java
│ ├── StructuralEvaluatorTest.java
│ ├── TraversorTest.java
│ └── XpathTest.java
├── java11/
│ └── org/
│ └── jsoup/
│ ├── helper/
│ │ ├── HttpClientExecutorTest.java
│ │ └── HttpClientTestAccess.java
│ └── integration/
│ ├── HttpClientConnectIT.java
│ ├── HttpClientConnectTest.java
│ ├── HttpClientSessionIT.java
│ └── HttpClientSessionTest.java
└── resources/
├── bomtests/
│ ├── bom_utf16be.html
│ ├── bom_utf16le.html
│ ├── bom_utf32be.html
│ ├── bom_utf32le.html
│ └── bom_utf8.html
├── fuzztests/
│ ├── ex-inselect16.html
│ └── garble.html
├── htmltests/
│ ├── README
│ ├── adopt-1.html
│ ├── basehref.html
│ ├── charset-base.html
│ ├── comments.html
│ ├── escapes-across-buffer.html
│ ├── form-tests.html
│ ├── gzip.html
│ ├── gzip.html.z
│ ├── large.html
│ ├── lowercase-charset-test.html
│ ├── medium.html
│ ├── meta-charset-1.html
│ ├── meta-charset-2.html
│ ├── meta-charset-3.html
│ ├── namespaces.xhtml
│ ├── table-invalid-elements.html
│ ├── table-polymer-template.html
│ ├── test-rss.xml
│ ├── upload-form.html
│ ├── xml-charset.xml
│ └── xml-test.xml
├── local-cert/
│ ├── README.md
│ ├── cert.conf
│ ├── server.crt
│ ├── server.key
│ ├── server.p12
│ └── server.pfx
└── printertests/
├── input-1.html
├── outline-1.html
├── passthru-1.html
└── pretty-1.html
Showing preview only (324K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (4175 symbols across 175 files)
FILE: src/main/java/org/jsoup/Connection.java
type Connection (line 47) | @SuppressWarnings("unused")
type Method (line 53) | enum Method {
method Method (line 68) | Method(boolean hasBody) {
method hasBody (line 76) | public final boolean hasBody() {
method newRequest (line 87) | Connection newRequest();
method newRequest (line 96) | default Connection newRequest(String url) {
method newRequest (line 107) | default Connection newRequest(URL url) {
method url (line 116) | Connection url(URL url);
method url (line 123) | Connection url(String url);
method proxy (line 130) | Connection proxy(@Nullable Proxy proxy);
method proxy (line 138) | Connection proxy(String host, int port);
method userAgent (line 146) | Connection userAgent(String userAgent);
method timeout (line 160) | Connection timeout(int millis);
method maxBodySize (line 171) | Connection maxBodySize(int bytes);
method referrer (line 178) | Connection referrer(String referrer);
method followRedirects (line 185) | Connection followRedirects(boolean followRedirects);
method method (line 192) | Connection method(Method method);
method ignoreHttpErrors (line 201) | Connection ignoreHttpErrors(boolean ignoreHttpErrors);
method ignoreContentType (line 211) | Connection ignoreContentType(boolean ignoreContentType);
method sslSocketFactory (line 223) | @Deprecated
method sslContext (line 235) | default Connection sslContext(SSLContext sslContext) {
method data (line 246) | Connection data(String key, String value);
method data (line 260) | Connection data(String key, String filename, InputStream inputStream);
method data (line 273) | Connection data(String key, String filename, InputStream inputStream, ...
method data (line 280) | Connection data(Collection<KeyVal> data);
method data (line 287) | Connection data(Map<String, String> data);
method data (line 301) | Connection data(String... keyvals);
method data (line 308) | @Nullable KeyVal data(String key);
method requestBody (line 321) | Connection requestBody(String body);
method requestBodyStream (line 339) | default Connection requestBodyStream(InputStream stream) {
method header (line 351) | Connection header(String name, String value);
method headers (line 360) | Connection headers(Map<String,String> headers);
method cookie (line 368) | Connection cookie(String name, String value);
method cookies (line 375) | Connection cookies(Map<String, String> cookies);
method cookieStore (line 383) | Connection cookieStore(CookieStore cookieStore);
method cookieStore (line 390) | CookieStore cookieStore();
method parser (line 399) | Connection parser(Parser parser);
method postDataCharset (line 406) | Connection postDataCharset(String charset);
method auth (line 462) | default Connection auth(@Nullable RequestAuthenticator authenticator) {
method get (line 475) | Document get() throws IOException;
method post (line 486) | Document post() throws IOException;
method execute (line 497) | Response execute() throws IOException;
method request (line 503) | Request request();
method request (line 510) | Connection request(Request request);
method response (line 517) | Response response();
method response (line 524) | Connection response(Response response);
method onResponseProgress (line 534) | default Connection onResponseProgress(Progress<Response> handler) {
type Base (line 542) | @SuppressWarnings("UnusedReturnValue")
method url (line 549) | URL url();
method url (line 556) | T url(URL url);
method method (line 562) | Method method();
method method (line 569) | T method(Method method);
method header (line 582) | @Nullable String header(String name);
method headers (line 589) | List<String> headers(String name);
method header (line 601) | T header(String name, String value);
method addHeader (line 611) | T addHeader(String name, String value);
method hasHeader (line 618) | boolean hasHeader(String name);
method hasHeaderWithValue (line 626) | boolean hasHeaderWithValue(String name, String value);
method removeHeader (line 633) | T removeHeader(String name);
method headers (line 644) | Map<String, String> headers();
method multiHeaders (line 650) | Map<String, List<String>> multiHeaders();
method cookie (line 657) | @Nullable String cookie(String name);
method cookie (line 665) | T cookie(String name, String value);
method hasCookie (line 672) | boolean hasCookie(String name);
method removeCookie (line 679) | T removeCookie(String name);
method cookies (line 689) | Map<String, String> cookies();
type Request (line 695) | @SuppressWarnings("UnusedReturnValue")
method proxy (line 701) | @Nullable Proxy proxy();
method proxy (line 708) | Request proxy(@Nullable Proxy proxy);
method proxy (line 716) | Request proxy(String host, int port);
method timeout (line 722) | int timeout();
method timeout (line 729) | Request timeout(int millis);
method maxBodySize (line 735) | int maxBodySize();
method maxBodySize (line 742) | Request maxBodySize(int bytes);
method followRedirects (line 748) | boolean followRedirects();
method followRedirects (line 755) | Request followRedirects(boolean followRedirects);
method ignoreHttpErrors (line 762) | boolean ignoreHttpErrors();
method ignoreHttpErrors (line 769) | Request ignoreHttpErrors(boolean ignoreHttpErrors);
method ignoreContentType (line 776) | boolean ignoreContentType();
method ignoreContentType (line 783) | Request ignoreContentType(boolean ignoreContentType);
method sslSocketFactory (line 789) | @Nullable SSLSocketFactory sslSocketFactory();
method sslSocketFactory (line 800) | @Deprecated
method sslContext (line 809) | @Nullable
method sslContext (line 823) | default Request sslContext(SSLContext sslContext) {
method data (line 832) | Request data(KeyVal keyval);
method data (line 838) | Collection<KeyVal> data();
method requestBody (line 852) | Request requestBody(@Nullable String body);
method requestBody (line 858) | @Nullable String requestBody();
method requestBodyStream (line 876) | default Request requestBodyStream(InputStream stream) {
method parser (line 885) | Request parser(Parser parser);
method parser (line 891) | Parser parser();
method postDataCharset (line 898) | Request postDataCharset(String charset);
method postDataCharset (line 904) | String postDataCharset();
method auth (line 914) | default Request auth(@Nullable RequestAuthenticator authenticator) {
method auth (line 923) | @Nullable
type Response (line 932) | interface Response extends Base<Response> {
method statusCode (line 938) | int statusCode();
method statusMessage (line 944) | String statusMessage();
method charset (line 950) | @Nullable String charset();
method charset (line 957) | Response charset(String charset);
method contentType (line 963) | @Nullable String contentType();
method parse (line 973) | Document parse() throws IOException;
method readBody (line 982) | default String readBody() throws IOException {
method body (line 998) | String body();
method bodyAsBytes (line 1010) | byte[] bodyAsBytes();
method readFully (line 1025) | default Response readFully() throws IOException {
method bufferUp (line 1038) | @Deprecated
method bodyStream (line 1052) | BufferedInputStream bodyStream();
method streamParser (line 1059) | default StreamParser streamParser() throws IOException {
type KeyVal (line 1067) | interface KeyVal {
method key (line 1074) | KeyVal key(String key);
method key (line 1080) | String key();
method value (line 1087) | KeyVal value(String value);
method value (line 1093) | String value();
method inputStream (line 1100) | KeyVal inputStream(InputStream inputStream);
method inputStream (line 1106) | @Nullable InputStream inputStream();
method hasInputStream (line 1112) | boolean hasInputStream();
method contentType (line 1121) | KeyVal contentType(String contentType);
method contentType (line 1127) | @Nullable String contentType();
FILE: src/main/java/org/jsoup/HttpStatusException.java
class HttpStatusException (line 8) | public class HttpStatusException extends IOException {
method HttpStatusException (line 12) | public HttpStatusException(String message, int statusCode, String url) {
method getStatusCode (line 18) | public int getStatusCode() {
method getUrl (line 22) | public String getUrl() {
FILE: src/main/java/org/jsoup/Jsoup.java
class Jsoup (line 25) | public class Jsoup {
method Jsoup (line 26) | private Jsoup() {}
method parse (line 36) | public static Document parse(String html, String baseUri) {
method parse (line 50) | public static Document parse(String html, String baseUri, Parser parse...
method parse (line 64) | public static Document parse(String html, Parser parser) {
method parse (line 77) | public static Document parse(String html) {
method connect (line 94) | public static Connection connect(String url) {
method newSession (line 121) | public static Connection newSession() {
method parse (line 136) | public static Document parse(File file, @Nullable String charsetName, ...
method parse (line 151) | public static Document parse(File file, @Nullable String charsetName) ...
method parse (line 168) | public static Document parse(File file) throws IOException {
method parse (line 185) | public static Document parse(File file, @Nullable String charsetName, ...
method parse (line 201) | public static Document parse(Path path, @Nullable String charsetName, ...
method parse (line 217) | public static Document parse(Path path, @Nullable String charsetName) ...
method parse (line 234) | public static Document parse(Path path) throws IOException {
method parse (line 251) | public static Document parse(Path path, @Nullable String charsetName, ...
method parse (line 266) | public static Document parse(InputStream in, @Nullable String charsetN...
method parse (line 283) | public static Document parse(InputStream in, @Nullable String charsetN...
method parseBodyFragment (line 296) | public static Document parseBodyFragment(String bodyHtml, String baseU...
method parseBodyFragment (line 308) | public static Document parseBodyFragment(String bodyHtml) {
method parse (line 329) | public static Document parse(URL url, int timeoutMillis) throws IOExce...
method clean (line 346) | public static String clean(String bodyHtml, String baseUri, Safelist s...
method clean (line 387) | public static String clean(String bodyHtml, Safelist safelist) {
method clean (line 405) | public static String clean(String bodyHtml, String baseUri, Safelist s...
method isValid (line 434) | public static boolean isValid(String bodyHtml, Safelist safelist) {
FILE: src/main/java/org/jsoup/Progress.java
type Progress (line 3) | @FunctionalInterface
method onProgress (line 16) | void onProgress(int processed, int total, float percent, ProgressConte...
FILE: src/main/java/org/jsoup/SerializationException.java
class SerializationException (line 7) | public final class SerializationException extends RuntimeException {
method SerializationException (line 11) | public SerializationException() {
method SerializationException (line 21) | public SerializationException(String message) {
method SerializationException (line 33) | public SerializationException(Throwable cause) {
method SerializationException (line 45) | public SerializationException(String message, Throwable cause) {
FILE: src/main/java/org/jsoup/UnsupportedMimeTypeException.java
class UnsupportedMimeTypeException (line 8) | public class UnsupportedMimeTypeException extends IOException {
method UnsupportedMimeTypeException (line 12) | public UnsupportedMimeTypeException(String message, String mimeType, S...
method getMimeType (line 18) | public String getMimeType() {
method getUrl (line 22) | public String getUrl() {
method toString (line 26) | @Override
FILE: src/main/java/org/jsoup/examples/HtmlToPlainText.java
class HtmlToPlainText (line 29) | public class HtmlToPlainText {
method main (line 33) | public static void main(String... args) throws IOException {
method getPlainText (line 62) | static String getPlainText(Element element) {
class FormattingVisitor (line 70) | private static class FormattingVisitor implements NodeVisitor {
method head (line 76) | @Override
method tail (line 90) | @Override
method append (line 100) | private void append(String text) {
method toString (line 128) | @Override
method trimParents (line 134) | static Elements trimParents(final Elements elements) {
FILE: src/main/java/org/jsoup/examples/ListLinks.java
class ListLinks (line 18) | public class ListLinks {
method main (line 19) | public static void main(String[] args) throws IOException {
method print (line 50) | private static void print(String msg, Object... args) {
method trim (line 54) | private static String trim(String s, int width) {
FILE: src/main/java/org/jsoup/examples/Wikipedia.java
class Wikipedia (line 16) | public class Wikipedia {
method main (line 17) | public static void main(String[] args) throws IOException {
method log (line 27) | private static void log(String msg, String... vals) {
FILE: src/main/java/org/jsoup/helper/AuthenticationHandler.java
class AuthenticationHandler (line 14) | class AuthenticationHandler extends Authenticator {
method AuthenticationHandler (line 34) | AuthenticationHandler() {}
method AuthenticationHandler (line 36) | AuthenticationHandler(RequestAuthenticator auth) {
method getPasswordAuthentication (line 44) | @Nullable @Override public final PasswordAuthentication getPasswordAut...
type AuthShim (line 61) | interface AuthShim {
method enable (line 62) | void enable(RequestAuthenticator auth, Object connOrHttp);
method remove (line 64) | void remove();
method get (line 66) | @Nullable AuthenticationHandler get(AuthenticationHandler helper);
class GlobalHandler (line 72) | static class GlobalHandler implements AuthShim {
method enable (line 78) | @Override public void enable(RequestAuthenticator auth, Object ignor...
method remove (line 82) | @Override public void remove() {
method get (line 86) | @Override public AuthenticationHandler get(AuthenticationHandler hel...
FILE: src/main/java/org/jsoup/helper/CookieUtil.java
class CookieUtil (line 27) | class CookieUtil {
method applyCookiesToRequest (line 38) | static void applyCookiesToRequest(HttpConnection.Request req, BiConsum...
method requestCookieSet (line 70) | private static LinkedHashSet<String> requestCookieSet(Connection.Reque...
method asUri (line 79) | static URI asUri(URL url) throws IOException {
method storeCookies (line 90) | static void storeCookies(HttpConnection.Request req, HttpConnection.Re...
method parseCookie (line 108) | static void parseCookie(@Nullable String value, HttpConnection.Respons...
FILE: src/main/java/org/jsoup/helper/DataUtil.java
class DataUtil (line 45) | @SuppressWarnings("CharsetObjectCanBeUsed")
method DataUtil (line 55) | private DataUtil() {}
method load (line 68) | public static Document load(File file, @Nullable String charsetName, S...
method load (line 86) | public static Document load(File file, @Nullable String charsetName, S...
method load (line 101) | public static Document load(Path path, @Nullable String charsetName, S...
method load (line 119) | public static Document load(Path path, @Nullable String charsetName, S...
method streamParser (line 139) | public static StreamParser streamParser(Path path, @Nullable Charset c...
method openStream (line 154) | private static ControllableInputStream openStream(Path path) throws IO...
method load (line 179) | public static Document load(InputStream in, @Nullable String charsetNa...
method load (line 192) | public static Document load(InputStream in, @Nullable String charsetNa...
method crossStreams (line 202) | static void crossStreams(final InputStream in, final OutputStream out)...
class CharsetDoc (line 211) | static class CharsetDoc {
method CharsetDoc (line 216) | CharsetDoc(Charset charset, @Nullable Document doc, InputStream inpu...
method parseInputStream (line 223) | static Document parseInputStream(@Nullable ControllableInputStream inp...
method detectCharset (line 240) | static CharsetDoc detectCharset(ControllableInputStream input, @Nullab...
method parseInputStream (line 312) | static Document parseInputStream(CharsetDoc charsetDoc, String baseUri...
method readToByteBuffer (line 345) | public static ByteBuffer readToByteBuffer(InputStream inStream, int ma...
method emptyByteBuffer (line 349) | static ByteBuffer emptyByteBuffer() {
method getCharsetFromContentType (line 359) | static @Nullable String getCharsetFromContentType(@Nullable String con...
method validateCharset (line 370) | private @Nullable static String validateCharset(@Nullable String cs) {
method mimeBoundary (line 386) | static String mimeBoundary() {
method detectCharsetFromBom (line 395) | private static @Nullable String detectCharsetFromBom(ControllableInput...
FILE: src/main/java/org/jsoup/helper/HttpConnection.java
class HttpConnection (line 59) | @SuppressWarnings("CharsetObjectCanBeUsed")
method connect (line 86) | public static Connection connect(String url) {
method connect (line 97) | public static Connection connect(URL url) {
method HttpConnection (line 106) | public HttpConnection() {
method HttpConnection (line 116) | HttpConnection(Request copy) {
method encodeMimeName (line 120) | static String encodeMimeName(String val) {
method newRequest (line 124) | @Override
method HttpConnection (line 131) | private HttpConnection(Request req, Response res) {
method url (line 136) | @Override
method url (line 142) | @Override
method proxy (line 153) | @Override
method proxy (line 159) | @Override
method userAgent (line 165) | @Override
method timeout (line 172) | @Override
method maxBodySize (line 178) | @Override
method followRedirects (line 184) | @Override
method referrer (line 190) | @Override
method method (line 197) | @Override
method ignoreHttpErrors (line 203) | @Override
method ignoreContentType (line 209) | @Override
method data (line 215) | @Override
method sslSocketFactory (line 221) | @Override
method sslContext (line 227) | @Override
method data (line 233) | @Override
method data (line 239) | @Override
method data (line 245) | @Override
method data (line 254) | @Override
method data (line 268) | @Override
method data (line 277) | @Override
method requestBody (line 287) | @Override
method requestBodyStream (line 293) | @Override
method header (line 299) | @Override
method headers (line 305) | @Override
method cookie (line 314) | @Override
method cookies (line 320) | @Override
method cookieStore (line 329) | @Override
method cookieStore (line 336) | @Override
method parser (line 341) | @Override
method get (line 347) | @Override
method post (line 355) | @Override
method execute (line 363) | @Override
method request (line 369) | @Override
method request (line 374) | @Override
method response (line 380) | @Override
method response (line 388) | @Override
method postDataCharset (line 394) | @Override
method auth (line 400) | @Override public Connection auth(@Nullable RequestAuthenticator authen...
method onResponseProgress (line 405) | @Override public Connection onResponseProgress(Progress<Connection.Res...
class Base (line 410) | @SuppressWarnings("unchecked")
method Base (line 426) | private Base() {
method Base (line 431) | private Base(Base<T> copy) {
method url (line 441) | @Override
method url (line 448) | @Override
method method (line 455) | @Override
method method (line 460) | @Override
method header (line 467) | @Override @Nullable
method addHeader (line 479) | @Override
method headers (line 494) | @Override
method header (line 500) | @Override
method hasHeader (line 508) | @Override
method hasHeaderWithValue (line 517) | @Override
method removeHeader (line 529) | @Override
method headers (line 538) | @Override
method multiHeaders (line 550) | @Override
method getHeadersCaseInsensitive (line 555) | private List<String> getHeadersCaseInsensitive(String name) {
method scanHeaders (line 566) | private Map.@Nullable Entry<String, List<String>> scanHeaders(String...
method cookie (line 575) | @Override
method cookie (line 581) | @Override
method hasCookie (line 589) | @Override
method removeCookie (line 595) | @Override
method cookies (line 602) | @Override
class Request (line 608) | public static class Request extends HttpConnection.Base<Connection.Req...
method Request (line 635) | Request() {
method Request (line 648) | Request(Request copy) {
method proxy (line 669) | @Override @Nullable
method proxy (line 674) | @Override
method proxy (line 680) | @Override
method timeout (line 686) | @Override
method timeout (line 691) | @Override
method maxBodySize (line 698) | @Override
method maxBodySize (line 703) | @Override
method followRedirects (line 710) | @Override
method followRedirects (line 715) | @Override
method ignoreHttpErrors (line 721) | @Override
method sslSocketFactory (line 726) | @Override @Nullable
method sslSocketFactory (line 731) | @Override
method sslContext (line 736) | @Override @Nullable
method sslContext (line 741) | @Override
method ignoreHttpErrors (line 747) | @Override
method ignoreContentType (line 753) | @Override
method ignoreContentType (line 758) | @Override
method data (line 764) | @Override
method data (line 771) | @Override
method requestBody (line 776) | @Override
method requestBody (line 782) | @Override @Nullable
method requestBodyStream (line 787) | @Override
method parser (line 793) | @Override
method parser (line 800) | @Override
method postDataCharset (line 805) | @Override
method postDataCharset (line 813) | @Override
method cookieManager (line 818) | CookieManager cookieManager() {
method auth (line 822) | @Override public Connection.Request auth(@Nullable RequestAuthentica...
method auth (line 827) | @Override @Nullable public RequestAuthenticator auth() {
class Response (line 832) | public static class Response extends HttpConnection.Base<Connection.Re...
method Response (line 857) | Response() {
method execute (line 865) | static Response execute(HttpConnection.Request req) throws IOExcepti...
method execute (line 869) | static Response execute(HttpConnection.Request req, @Nullable Respon...
method statusCode (line 962) | @Override
method statusMessage (line 967) | @Override
method charset (line 972) | @Override @Nullable
method charset (line 977) | @Override
method contentType (line 983) | @Override @Nullable
method prepareParse (line 989) | private ControllableInputStream prepareParse() {
method parse (line 1003) | @Override public Document parse() throws IOException {
method streamParser (line 1012) | @Override public StreamParser streamParser() throws IOException {
method readFully (line 1032) | @Override
method readByteDataUnchecked (line 1051) | private void readByteDataUnchecked() {
method readBody (line 1059) | @Override
method body (line 1065) | @Override
method bodyAsBytes (line 1076) | @Override
method bufferUp (line 1095) | @Override
method bodyStream (line 1101) | @Override
method safeClose (line 1122) | private void safeClose() {
method Response (line 1136) | Response(HttpConnection.Request request) {
method prepareResponse (line 1141) | void prepareResponse(Map<String, List<String>> resHeaders, HttpConne...
method processResponseHeaders (line 1160) | void processResponseHeaders(Map<String, List<String>> resHeaders) {
method fixHeaderEncoding (line 1180) | @Nullable
method looksLikeUtf8 (line 1193) | private static boolean looksLikeUtf8(byte[] input) {
method setOutputContentType (line 1237) | private static void setOutputContentType(final HttpConnection.Reques...
method writePost (line 1260) | static void writePost(final HttpConnection.Request req, final Output...
method implWritePost (line 1267) | private static void implWritePost(final HttpConnection.Request req, ...
method serialiseRequestUrl (line 1322) | private static void serialiseRequestUrl(Connection.Request req) thro...
method needsMultipart (line 1334) | private static boolean needsMultipart(Connection.Request req) {
class KeyVal (line 1343) | public static class KeyVal implements Connection.KeyVal {
method create (line 1349) | public static KeyVal create(String key, String value) {
method create (line 1353) | public static KeyVal create(String key, String filename, InputStream...
method KeyVal (line 1358) | private KeyVal(String key, String value) {
method key (line 1365) | @Override
method key (line 1372) | @Override
method value (line 1377) | @Override
method value (line 1384) | @Override
method inputStream (line 1389) | @Override
method inputStream (line 1396) | @Override @Nullable
method hasInputStream (line 1401) | @Override
method contentType (line 1406) | @Override
method contentType (line 1413) | @Override @Nullable
method toString (line 1418) | @Override
FILE: src/main/java/org/jsoup/helper/Re2jRegex.java
class Re2jRegex (line 6) | final class Re2jRegex extends Regex {
method Re2jRegex (line 11) | private Re2jRegex(com.google.re2j.Pattern re2jPattern) {
method compile (line 16) | public static Regex compile(String regex) {
method matcher (line 26) | @Override
method toString (line 31) | @Override
class Re2jMatcher (line 36) | private static final class Re2jMatcher implements Matcher {
method Re2jMatcher (line 39) | Re2jMatcher(com.google.re2j.Matcher delegate) {
method find (line 43) | @Override
FILE: src/main/java/org/jsoup/helper/Regex.java
class Regex (line 19) | public class Regex {
method Regex (line 24) | Regex(Pattern jdkPattern) {
method compile (line 35) | public static Regex compile(String regex) {
method fromPattern (line 48) | public static Regex fromPattern(Pattern pattern) {
method usingRe2j (line 56) | public static boolean usingRe2j() {
method wantsRe2j (line 60) | static boolean wantsRe2j() {
method wantsRe2j (line 64) | static void wantsRe2j(boolean use) {
method hasRe2j (line 68) | static boolean hasRe2j() {
method matcher (line 94) | public Matcher matcher(CharSequence input) {
method toString (line 98) | @Override
type Matcher (line 103) | public interface Matcher {
method find (line 104) | boolean find();
class JdkMatcher (line 107) | private static final class JdkMatcher implements Matcher {
method JdkMatcher (line 110) | JdkMatcher(java.util.regex.Matcher delegate) {
method find (line 114) | @Override
FILE: src/main/java/org/jsoup/helper/RequestAuthenticator.java
type RequestAuthenticator (line 14) | @FunctionalInterface
method authenticate (line 23) | @Nullable
class Context (line 29) | class Context {
method Context (line 34) | Context(URL url, Authenticator.RequestorType type, String realm) {
method url (line 44) | public URL url() {
method type (line 53) | public Authenticator.RequestorType type() {
method realm (line 61) | public String realm() {
method isProxy (line 69) | public boolean isProxy() {
method isServer (line 77) | public boolean isServer() {
method credentials (line 87) | public PasswordAuthentication credentials(String username, String pa...
FILE: src/main/java/org/jsoup/helper/RequestDispatch.java
class RequestDispatch (line 17) | class RequestDispatch {
method get (line 34) | static RequestExecutor get(Request request, @Nullable Response previou...
FILE: src/main/java/org/jsoup/helper/RequestExecutor.java
class RequestExecutor (line 14) | abstract class RequestExecutor {
method RequestExecutor (line 18) | RequestExecutor(Request request, @Nullable Response previousResponse) {
method execute (line 23) | abstract Response execute() throws IOException;
method responseBody (line 25) | abstract InputStream responseBody() throws IOException;
method safeClose (line 27) | abstract void safeClose();
FILE: src/main/java/org/jsoup/helper/UrlBuilder.java
class UrlBuilder (line 23) | final class UrlBuilder {
method UrlBuilder (line 27) | UrlBuilder(URL inputUrl) {
method build (line 33) | URL build() {
method appendKeyVal (line 65) | void appendKeyVal(Connection.KeyVal kv) throws UnsupportedEncodingExce...
method decodePart (line 76) | private static String decodePart(String encoded) {
method appendToAscii (line 86) | private static void appendToAscii(String s, boolean spaceAsPlus, Strin...
method isHex (line 107) | private static boolean isHex(char c) {
FILE: src/main/java/org/jsoup/helper/UrlConnectionExecutor.java
class UrlConnectionExecutor (line 22) | class UrlConnectionExecutor extends RequestExecutor {
method UrlConnectionExecutor (line 26) | UrlConnectionExecutor(HttpConnection.Request req, HttpConnection.@Null...
method execute (line 30) | @Override
method responseBody (line 64) | @Override
method safeClose (line 70) | @Override
method createConnection (line 79) | private static HttpURLConnection createConnection(HttpConnection.Reque...
method createHeaderMap (line 112) | private static LinkedHashMap<String, List<String>> createHeaderMap(Htt...
FILE: src/main/java/org/jsoup/helper/Validate.java
class Validate (line 8) | public final class Validate {
method Validate (line 10) | private Validate() {}
method notNull (line 17) | public static void notNull(@Nullable Object obj) {
method notNullParam (line 29) | public static void notNullParam(@Nullable final Object obj, final Stri...
method notNull (line 40) | public static void notNull(@Nullable Object obj, String msg) {
method ensureNotNull (line 53) | @Deprecated
method ensureNotNull (line 70) | @Deprecated
method expectNotNull (line 85) | public static <T> T expectNotNull(@Nullable T obj) {
method expectNotNull (line 101) | public static <T> T expectNotNull(@Nullable T obj, String msg, Object....
method isTrue (line 112) | public static void isTrue(boolean val) {
method isTrue (line 123) | public static void isTrue(boolean val, String msg) {
method isFalse (line 133) | public static void isFalse(boolean val) {
method isFalse (line 144) | public static void isFalse(boolean val, String msg) {
method noNullElements (line 154) | public static void noNullElements(Object[] objects) {
method noNullElements (line 164) | public static void noNullElements(Object[] objects, String msg) {
method notEmpty (line 175) | public static void notEmpty(@Nullable String string) {
method notEmptyParam (line 186) | public static void notEmptyParam(@Nullable final String string, final ...
method notEmpty (line 197) | public static void notEmpty(@Nullable String string, String msg) {
method wtf (line 207) | public static void wtf(String msg) {
method fail (line 216) | public static void fail(String msg) {
method assertFail (line 226) | static boolean assertFail(String msg) {
method fail (line 237) | public static void fail(String msg, Object... args) {
FILE: src/main/java/org/jsoup/helper/ValidationException.java
class ValidationException (line 9) | public class ValidationException extends IllegalArgumentException {
method ValidationException (line 13) | public ValidationException(String msg) {
method fillInStackTrace (line 17) | @Override
FILE: src/main/java/org/jsoup/helper/W3CDom.java
class W3CDom (line 48) | public class W3CDom {
method W3CDom (line 63) | public W3CDom() {
method namespaceAware (line 73) | public boolean namespaceAware() {
method namespaceAware (line 84) | public W3CDom namespaceAware(boolean namespaceAware) {
method convert (line 96) | public static Document convert(org.jsoup.nodes.Document in) {
method asString (line 119) | public static String asString(Document doc, @Nullable Map<String, Stri...
method propertiesFromMap (line 150) | static Properties propertiesFromMap(Map<String, String> map) {
method OutputHtml (line 157) | public static HashMap<String, String> OutputHtml() {
method OutputXml (line 162) | public static HashMap<String, String> OutputXml() {
method methodMap (line 166) | private static HashMap<String, String> methodMap(String method) {
method fromJsoup (line 180) | public Document fromJsoup(org.jsoup.nodes.Document in) {
method fromJsoup (line 196) | public Document fromJsoup(org.jsoup.nodes.Element in) {
method convert (line 232) | public void convert(org.jsoup.nodes.Document in, Document out) {
method convert (line 245) | public void convert(org.jsoup.nodes.Element in, Document out) {
method selectXpath (line 266) | public NodeList selectXpath(String xpath, Document doc) {
method selectXpath (line 276) | public NodeList selectXpath(String xpath, Node contextNode) {
method sourceNodes (line 305) | public <T extends org.jsoup.nodes.Node> List<T> sourceNodes(NodeList n...
method contextNode (line 325) | public Node contextNode(Document wDoc) {
method asString (line 337) | public String asString(Document doc) {
class W3CBuilder (line 344) | protected static class W3CBuilder implements NodeVisitor {
method W3CBuilder (line 351) | public W3CBuilder(Document doc) {
method head (line 357) | @Override
method append (line 393) | private void append(Node append, org.jsoup.nodes.Node source) {
method tail (line 398) | @Override
method copyAttributes (line 405) | private void copyAttributes(org.jsoup.nodes.Element jEl, Element wEl) {
method setAttribute (line 416) | private void setAttribute(org.jsoup.nodes.Element jEl, Element wEl, ...
method maybeAddUndeclaredNs (line 435) | private void maybeAddUndeclaredNs(String namespace, String attrKey, ...
FILE: src/main/java/org/jsoup/internal/ControllableInputStream.java
class ControllableInputStream (line 21) | public class ControllableInputStream extends FilterInputStream {
method ControllableInputStream (line 37) | private ControllableInputStream(SimpleBufferedInput in, int maxSize) {
method wrap (line 53) | public static ControllableInputStream wrap(@Nullable InputStream in, i...
method wrap (line 68) | public static ControllableInputStream wrap(InputStream in, int bufferS...
method read (line 73) | @Override
method markSupported (line 113) | @Override
method readToByteBuffer (line 122) | public static ByteBuffer readToByteBuffer(InputStream in, int max) thr...
method reset (line 154) | @SuppressWarnings("NonSynchronizedMethodOverridesSynchronizedMethod") ...
method mark (line 170) | @SuppressWarnings("NonSynchronizedMethodOverridesSynchronizedMethod") ...
method baseReadFully (line 181) | public boolean baseReadFully() {
method resetFullyRead (line 185) | public void resetFullyRead() {
method max (line 193) | public int max() {
method max (line 197) | public void max(int newMax) {
method allowClose (line 204) | public void allowClose(boolean allowClose) {
method close (line 208) | @Override public void close() throws IOException {
method timeout (line 212) | public ControllableInputStream timeout(long startTimeNanos, long timeo...
method emitProgress (line 218) | private void emitProgress() {
method onProgress (line 227) | public <ProgressContext> ControllableInputStream onProgress(int conten...
method expired (line 236) | private boolean expired() {
method inputStream (line 245) | public BufferedInputStream inputStream() {
FILE: src/main/java/org/jsoup/internal/Functions.java
class Functions (line 16) | @SuppressWarnings({"rawtypes", "unchecked"})
method Functions (line 24) | private Functions() {
method listFunction (line 27) | public static <T, U> Function<T, List<U>> listFunction() {
method setFunction (line 31) | public static <T, U> Function<T, Set<U>> setFunction() {
method mapFunction (line 35) | public static <T, K, V> Function<T, Map<K, V>> mapFunction() {
method identityMapFunction (line 39) | public static <T, K, V> Function<T, IdentityHashMap<K, V>> identityMap...
FILE: src/main/java/org/jsoup/internal/Normalizer.java
class Normalizer (line 12) | public final class Normalizer {
method lowerCase (line 15) | public static String lowerCase(final String input) {
method normalize (line 20) | public static String normalize(final String input) {
method normalize (line 29) | @Deprecated
method xmlSafeTagName (line 35) | @Nullable public static String xmlSafeTagName(final String tagname) {
FILE: src/main/java/org/jsoup/internal/QuietAppendable.java
class QuietAppendable (line 11) | public abstract class QuietAppendable {
method append (line 13) | public abstract QuietAppendable append(CharSequence csq);
method append (line 15) | public abstract QuietAppendable append(char c);
method append (line 17) | public abstract QuietAppendable append(char[] chars, int offset, int l...
class BaseAppendable (line 19) | static final class BaseAppendable extends QuietAppendable {
type Action (line 22) | @FunctionalInterface
method append (line 24) | void append() throws IOException;
method BaseAppendable (line 27) | private BaseAppendable(Appendable appendable) {
method quiet (line 31) | private BaseAppendable quiet(Action action) {
method append (line 40) | @Override
method append (line 45) | @Override
method append (line 50) | @Override
class StringBuilderAppendable (line 57) | static final class StringBuilderAppendable extends QuietAppendable {
method StringBuilderAppendable (line 60) | private StringBuilderAppendable(StringBuilder sb) {
method append (line 64) | @Override
method append (line 70) | @Override
method append (line 76) | @Override
method toString (line 82) | @Override
method wrap (line 88) | public static QuietAppendable wrap(Appendable a) {
FILE: src/main/java/org/jsoup/internal/SharedConstants.java
class SharedConstants (line 7) | public final class SharedConstants {
method SharedConstants (line 26) | private SharedConstants() {}
FILE: src/main/java/org/jsoup/internal/SimpleBufferedInput.java
class SimpleBufferedInput (line 17) | class SimpleBufferedInput extends FilterInputStream {
method SimpleBufferedInput (line 28) | SimpleBufferedInput(@Nullable InputStream in) {
method read (line 33) | @Override
method read (line 43) | @Override
method fill (line 68) | private void fill() throws IOException {
method getBuf (line 99) | byte[] getBuf() {
method baseReadFully (line 108) | boolean baseReadFully() {
method resetFullyRead (line 112) | void resetFullyRead() {
method available (line 117) | @Override
method capRemaining (line 126) | void capRemaining(int newRemaining) {
method setMark (line 130) | void setMark() {
method rewindToMark (line 134) | void rewindToMark() throws IOException {
method clearMark (line 140) | void clearMark() {
method compact (line 144) | private void compact() {
method close (line 160) | @Override
FILE: src/main/java/org/jsoup/internal/SimpleStreamReader.java
class SimpleStreamReader (line 21) | public class SimpleStreamReader extends Reader {
method SimpleStreamReader (line 26) | public SimpleStreamReader(InputStream in, Charset charset) {
method read (line 36) | @Override
method hasAvailableBytes (line 67) | private boolean hasAvailableBytes() {
method bufferUp (line 75) | private int bufferUp() throws IOException {
method close (line 91) | @Override
FILE: src/main/java/org/jsoup/internal/SoftPool.java
class SoftPool (line 15) | public class SoftPool<T> {
method SoftPool (line 28) | public SoftPool(Supplier<T> initializer) {
method borrow (line 38) | public T borrow() {
method release (line 51) | public void release(T value) {
method getStack (line 58) | ArrayDeque<T> getStack() {
FILE: src/main/java/org/jsoup/internal/StringUtil.java
class StringUtil (line 19) | public final class StringUtil {
method join (line 31) | public static String join(Collection<?> strings, String sep) {
method join (line 41) | public static String join(Iterator<?> strings, String sep) {
method join (line 63) | public static String join(String[] strings, String sep) {
class StringJoiner (line 71) | public static class StringJoiner {
method StringJoiner (line 82) | public StringJoiner(String separator) {
method add (line 89) | public StringJoiner add(Object stringy) {
method append (line 101) | public StringJoiner append(Object stringy) {
method complete (line 110) | public String complete() {
method padding (line 123) | public static String padding(int width) {
method padding (line 133) | public static String padding(int width, int maxPaddingWidth) {
method isBlank (line 151) | public static boolean isBlank(@Nullable String string) {
method startsWithNewline (line 168) | public static boolean startsWithNewline(final String string) {
method isNumeric (line 179) | public static boolean isNumeric(String string) {
method isWhitespace (line 197) | public static boolean isWhitespace(int c){
method isActuallyWhitespace (line 206) | public static boolean isActuallyWhitespace(int c){
method isInvisibleChar (line 211) | public static boolean isInvisibleChar(int c) {
method normaliseWhitespace (line 222) | public static String normaliseWhitespace(String string) {
method appendNormalisedWhitespace (line 234) | public static void appendNormalisedWhitespace(StringBuilder accum, Str...
method in (line 256) | public static boolean in(final String needle, final String... haystack) {
method inSorted (line 265) | public static boolean inSorted(String needle, String[] haystack) {
method isAscii (line 274) | public static boolean isAscii(String string) {
method resolve (line 293) | public static URL resolve(URL base, String relUrl) throws MalformedURL...
method resolve (line 313) | public static String resolve(String baseUrl, String relUrl) {
method stripControlChars (line 335) | private static String stripControlChars(final String input) {
method borrowBuilder (line 351) | public static StringBuilder borrowBuilder() {
method releaseBuilder (line 361) | public static String releaseBuilder(StringBuilder sb) {
method releaseBuilderVoid (line 373) | public static void releaseBuilderVoid(StringBuilder sb) {
method joining (line 388) | public static Collector<CharSequence, ?, String> joining(String delimi...
method isAsciiLetter (line 398) | public static boolean isAsciiLetter(char c) {
method isDigit (line 402) | public static boolean isDigit(char c) {
method isHexDigit (line 406) | public static boolean isHexDigit(char c) {
FILE: src/main/java/org/jsoup/nodes/Attribute.java
class Attribute (line 20) | public class Attribute implements Map.Entry<String, String>, Cloneable {
method Attribute (line 38) | public Attribute(String key, @Nullable String value) {
method Attribute (line 48) | public Attribute(String key, @Nullable String val, @Nullable Attribute...
method getKey (line 61) | @Override
method setKey (line 70) | public void setKey(String key) {
method getValue (line 95) | @Override
method hasDeclaredValue (line 104) | public boolean hasDeclaredValue() {
method setValue (line 113) | @Override public String setValue(@Nullable String val) {
method prefix (line 133) | public String prefix() {
method localName (line 146) | public String localName() {
method namespace (line 158) | public String namespace() {
method html (line 172) | public String html() {
method sourceRange (line 190) | public Range.AttributeRange sourceRange() {
method html (line 195) | void html(QuietAppendable accum, Document.OutputSettings out) {
method html (line 199) | static void html(String key, @Nullable String val, QuietAppendable acc...
method html (line 206) | @Deprecated
method html (line 212) | @Deprecated
method htmlNoValidate (line 217) | static void htmlNoValidate(String key, @Nullable String val, QuietAppe...
method getValidKey (line 235) | @Nullable public static String getValidKey(String key, Syntax syntax) {
method isValidXmlKey (line 249) | private static boolean isValidXmlKey(String key) {
method isValidHtmlKey (line 264) | private static boolean isValidHtmlKey(String key) {
method toString (line 280) | @Override
method createFromEncoded (line 291) | public static Attribute createFromEncoded(String unencodedKey, String ...
method isDataAttribute (line 296) | protected boolean isDataAttribute() {
method isDataAttribute (line 300) | protected static boolean isDataAttribute(String key) {
method shouldCollapseAttribute (line 311) | @Deprecated
method shouldCollapseAttribute (line 317) | protected static boolean shouldCollapseAttribute(final String key, @Nu...
method isBooleanAttribute (line 325) | public static boolean isBooleanAttribute(final String key) {
method equals (line 329) | @Override
method hashCode (line 337) | @Override
method clone (line 342) | @Override
FILE: src/main/java/org/jsoup/nodes/Attributes.java
class Attributes (line 43) | public class Attributes implements Iterable<Attribute>, Cloneable {
method checkCapacity (line 63) | private void checkCapacity(int minNewSize) {
method indexOfKey (line 76) | int indexOfKey(String key) {
method indexOfKeyIgnoreCase (line 85) | private int indexOfKeyIgnoreCase(String key) {
method checkNotNull (line 96) | static String checkNotNull(@Nullable Object val) {
method get (line 106) | public String get(String key) {
method attribute (line 119) | @Nullable public Attribute attribute(String key) {
method getIgnoreCase (line 129) | public String getIgnoreCase(String key) {
method add (line 138) | public Attributes add(String key, @Nullable String value) {
method addObject (line 143) | private void addObject(String key, @Nullable Object value) {
method put (line 156) | public Attributes put(String key, @Nullable String value) {
method userData (line 172) | Map<String, Object> userData() {
method hasUserData (line 189) | boolean hasUserData() {
method userData (line 200) | @Nullable
method userData (line 216) | public Attributes userData(String key, @Nullable Object value) {
method putIgnoreCase (line 225) | void putIgnoreCase(String key, @Nullable String value) {
method put (line 244) | public Attributes put(String key, boolean value) {
method put (line 257) | public Attributes put(Attribute attribute) {
method remove (line 265) | @SuppressWarnings("AssignmentToNull")
method remove (line 282) | public void remove(String key) {
method removeIgnoreCase (line 292) | public void removeIgnoreCase(String key) {
method hasKey (line 303) | public boolean hasKey(String key) {
method hasKeyIgnoreCase (line 312) | public boolean hasKeyIgnoreCase(String key) {
method hasDeclaredValueForKey (line 321) | public boolean hasDeclaredValueForKey(String key) {
method hasDeclaredValueForKeyIgnoreCase (line 331) | public boolean hasDeclaredValueForKeyIgnoreCase(String key) {
method size (line 343) | public int size() {
method isEmpty (line 356) | public boolean isEmpty() {
method addAll (line 364) | public void addAll(Attributes incoming) {
method sourceRange (line 392) | public Range.AttributeRange sourceRange(String key) {
method getRanges (line 401) | @Nullable Map<String, Range.AttributeRange> getRanges() {
method sourceRange (line 413) | public Attributes sourceRange(String key, Range.AttributeRange range) {
method iterator (line 426) | @Override
method asList (line 475) | public List<Attribute> asList() {
method dataset (line 493) | public Map<String, String> dataset() {
method html (line 501) | public String html() {
method html (line 507) | final void html(final QuietAppendable accum, final Document.OutputSett...
method toString (line 520) | @Override
method equals (line 531) | @Override
method hashCode (line 552) | @Override
method clone (line 560) | @Override
method normalize (line 585) | public void normalize() {
method deduplicate (line 600) | public int deduplicate(ParseSettings settings) {
class Dataset (line 618) | private static class Dataset extends AbstractMap<String, String> {
method Dataset (line 621) | private Dataset(Attributes attributes) {
method entrySet (line 625) | @Override
method put (line 630) | @Override
class EntrySet (line 638) | private class EntrySet extends AbstractSet<Map.Entry<String, String>> {
method iterator (line 640) | @Override
method size (line 645) | @Override
class DatasetIterator (line 655) | private class DatasetIterator implements Iterator<Map.Entry<String, ...
method hasNext (line 658) | @Override public boolean hasNext() {
method next (line 666) | @Override public Entry<String, String> next() {
method remove (line 670) | @Override public void remove() {
method dataKey (line 676) | private static String dataKey(String key) {
method internalKey (line 680) | static String internalKey(String key) {
method isInternalKey (line 684) | static boolean isInternalKey(String key) {
FILE: src/main/java/org/jsoup/nodes/CDataNode.java
class CDataNode (line 8) | public class CDataNode extends TextNode {
method CDataNode (line 9) | public CDataNode(String text) {
method nodeName (line 13) | @Override
method text (line 22) | @Override
method outerHtmlHead (line 27) | @Override
method clone (line 35) | @Override
FILE: src/main/java/org/jsoup/nodes/Comment.java
class Comment (line 13) | public class Comment extends LeafNode {
method Comment (line 18) | public Comment(String data) {
method nodeName (line 22) | @Override public String nodeName() {
method getData (line 30) | public String getData() {
method setData (line 34) | public Comment setData(String data) {
method outerHtmlHead (line 39) | @Override
method clone (line 47) | @Override
method isXmlDeclaration (line 59) | public boolean isXmlDeclaration() {
method isXmlDeclarationData (line 64) | private static boolean isXmlDeclarationData(String data) {
method asXmlDeclaration (line 73) | public @Nullable XmlDeclaration asXmlDeclaration() {
FILE: src/main/java/org/jsoup/nodes/DataNode.java
class DataNode (line 9) | public class DataNode extends LeafNode {
method DataNode (line 15) | public DataNode(String data) {
method nodeName (line 19) | @Override public String nodeName() {
method getWholeData (line 27) | public String getWholeData() {
method setWholeData (line 36) | public DataNode setWholeData(String data) {
method outerHtmlHead (line 41) | @Override
method clone (line 59) | @Override
FILE: src/main/java/org/jsoup/nodes/Document.java
class Document (line 25) | public class Document extends Element {
method Document (line 39) | public Document(String namespace, String baseUri) {
method Document (line 43) | private Document(String namespace, String baseUri, Parser parser) {
method Document (line 55) | public Document(String baseUri) {
method createShell (line 64) | public static Document createShell(String baseUri) {
method location (line 81) | public String location() {
method connection (line 91) | public Connection connection() {
method documentType (line 102) | public @Nullable DocumentType documentType() {
method htmlEl (line 116) | private Element htmlEl() {
method head (line 134) | public Element head() {
method body (line 154) | public Element body() {
method forms (line 172) | public List<FormElement> forms() {
method expectForm (line 184) | public FormElement expectForm(String cssQuery) {
method title (line 197) | public String title() {
method title (line 209) | public void title(String title) {
method createElement (line 222) | public Element createElement(String tagName) {
method outerHtml (line 229) | @Override
method text (line 239) | @Override
method nodeName (line 245) | @Override
method charset (line 268) | public void charset(Charset charset) {
method charset (line 279) | public Charset charset() {
method clone (line 283) | @Override
method shallowClone (line 292) | @Override
method ensureMetaCharsetElement (line 301) | private void ensureMetaCharsetElement() {
method ensureXmlDecl (line 319) | private XmlDeclaration ensureXmlDecl() {
class OutputSettings (line 334) | public static class OutputSettings implements Cloneable {
type Syntax (line 338) | public enum Syntax {html, xml}
method OutputSettings (line 351) | public OutputSettings() {
method escapeMode (line 366) | public Entities.EscapeMode escapeMode() {
method escapeMode (line 376) | public OutputSettings escapeMode(Entities.EscapeMode escapeMode) {
method charset (line 389) | public Charset charset() {
method charset (line 398) | public OutputSettings charset(Charset charset) {
method charset (line 408) | public OutputSettings charset(String charset) {
method syntax (line 417) | public Syntax syntax() {
method syntax (line 429) | public OutputSettings syntax(Syntax syntax) {
method prettyPrint (line 441) | public boolean prettyPrint() {
method prettyPrint (line 450) | public OutputSettings prettyPrint(boolean pretty) {
method outline (line 460) | public boolean outline() {
method outline (line 469) | public OutputSettings outline(boolean outlineMode) {
method indentAmount (line 478) | public int indentAmount() {
method indentAmount (line 487) | public OutputSettings indentAmount(int indentAmount) {
method maxPaddingWidth (line 498) | public int maxPaddingWidth() {
method maxPaddingWidth (line 508) | public OutputSettings maxPaddingWidth(int maxPaddingWidth) {
method clone (line 514) | @Override
method outputSettings (line 533) | public OutputSettings outputSettings() {
method outputSettings (line 542) | public Document outputSettings(OutputSettings outputSettings) {
type QuirksMode (line 548) | public enum QuirksMode {
method quirksMode (line 552) | public QuirksMode quirksMode() {
method quirksMode (line 556) | public Document quirksMode(QuirksMode quirksMode) {
method parser (line 565) | public Parser parser() {
method parser (line 575) | public Document parser(Parser parser) {
method connection (line 589) | public Document connection(Connection connection) {
FILE: src/main/java/org/jsoup/nodes/DocumentType.java
class DocumentType (line 13) | public class DocumentType extends LeafNode {
method DocumentType (line 28) | public DocumentType(String name, String publicId, String systemId) {
method setPubSysKey (line 39) | public void setPubSysKey(@Nullable String value) {
method updatePubSyskey (line 44) | private void updatePubSyskey() {
method name (line 55) | public String name() {
method publicId (line 63) | public String publicId() {
method systemId (line 71) | public String systemId() {
method nodeName (line 75) | @Override
method outerHtmlHead (line 80) | @Override
method has (line 100) | private boolean has(final String attribute) {
FILE: src/main/java/org/jsoup/nodes/Element.java
class Element (line 50) | public class Element extends Node implements Iterable<Element> {
method Element (line 64) | public Element(String tag, String namespace) {
method Element (line 73) | public Element(String tag) {
method Element (line 86) | public Element(Tag tag, @Nullable String baseUri, @Nullable Attributes...
method Element (line 101) | public Element(Tag tag, @Nullable String baseUri) {
method hasChildNodes (line 108) | protected boolean hasChildNodes() {
method ensureChildNodes (line 112) | @Override protected List<Node> ensureChildNodes() {
method hasAttributes (line 119) | @Override
method attributes (line 124) | @Override
method baseUri (line 131) | @Override
method searchUpForAttribute (line 137) | @Nullable
method doSetBaseUri (line 148) | @Override
method childNodeSize (line 153) | @Override
method nodeName (line 158) | @Override
method tagName (line 169) | public String tagName() {
method normalName (line 179) | @Override
method elementIs (line 191) | public boolean elementIs(String normalName, String namespace) {
method tagName (line 203) | public Element tagName(String tagName) {
method tagName (line 216) | public Element tagName(String tagName, String namespace) {
method tag (line 229) | public Tag tag() {
method tag (line 239) | public Element tag(Tag tag) {
method isBlock (line 251) | public boolean isBlock() {
method id (line 260) | public String id() {
method id (line 269) | public Element id(String id) {
method attr (line 281) | @Override public Element attr(String attributeKey, String attributeVal...
method attr (line 296) | public Element attr(String attributeKey, boolean attributeValue) {
method attribute (line 308) | @Nullable public Attribute attribute(String key) {
method dataset (line 325) | public Map<String, String> dataset() {
method parent (line 329) | @Override @Nullable
method parents (line 338) | public Elements parents() {
method child (line 359) | public Element child(int index) {
method childrenSize (line 385) | public int childrenSize() {
method children (line 398) | public Elements children() {
method childElementsList (line 406) | List<Element> childElementsList() {
method cachedChildren (line 423) | @Nullable List<Element> cachedChildren() {
method stashChildren (line 440) | private void stashChildren(List<Element> els) {
method stream (line 453) | public Stream<Element> stream() {
method filterNodes (line 457) | private <T> List<T> filterNodes(Class<T> clazz) {
method textNodes (line 480) | public List<TextNode> textNodes() {
method dataNodes (line 493) | public List<DataNode> dataNodes() {
method select (line 518) | public Elements select(String cssQuery) {
method select (line 530) | public Elements select(Evaluator evaluator) {
method selectStream (line 552) | public Stream<Element> selectStream(String cssQuery) {
method selectStream (line 564) | public Stream<Element> selectStream(Evaluator evaluator) {
method selectFirst (line 577) | public @Nullable Element selectFirst(String cssQuery) {
method selectFirst (line 589) | public @Nullable Element selectFirst(Evaluator evaluator) {
method expectFirst (line 601) | public Element expectFirst(String cssQuery) {
method selectNodes (line 619) | public Nodes<Node> selectNodes(Evaluator evaluator) {
method selectNodes (line 633) | public Nodes<Node> selectNodes(String cssQuery) {
method selectNodes (line 647) | public <T extends Node> Nodes<T> selectNodes(Evaluator evaluator, Clas...
method selectNodes (line 665) | public <T extends Node> Nodes<T> selectNodes(String cssQuery, Class<T>...
method selectFirstNode (line 682) | public @Nullable <T extends Node> T selectFirstNode(String cssQuery, C...
method selectFirstNode (line 695) | public @Nullable <T extends Node> T selectFirstNode(Evaluator evaluato...
method expectFirstNode (line 708) | public <T extends Node> T expectFirstNode(String cssQuery, Class<T> ty...
method is (line 725) | public boolean is(String cssQuery) {
method is (line 734) | public boolean is(Evaluator evaluator) {
method closest (line 745) | public @Nullable Element closest(String cssQuery) {
method closest (line 756) | public @Nullable Element closest(Evaluator evaluator) {
method selectXpath (line 786) | public Elements selectXpath(String xpath) {
method selectXpath (line 803) | public <T extends Node> List<T> selectXpath(String xpath, Class<T> nod...
method appendChild (line 815) | public Element appendChild(Node child) {
method appendChildren (line 833) | public Element appendChildren(Collection<? extends Node> children) {
method appendTo (line 844) | public Element appendTo(Element parent) {
method prependChild (line 856) | public Element prependChild(Node child) {
method prependChildren (line 870) | public Element prependChildren(Collection<? extends Node> children) {
method insertChildren (line 885) | public Element insertChildren(int index, Collection<? extends Node> ch...
method insertChildren (line 903) | public Element insertChildren(int index, Node... children) {
method appendElement (line 920) | public Element appendElement(String tagName) {
method appendElement (line 931) | public Element appendElement(String tagName, String namespace) {
method prependElement (line 945) | public Element prependElement(String tagName) {
method prependElement (line 956) | public Element prependElement(String tagName, String namespace) {
method appendText (line 969) | public Element appendText(String text) {
method prependText (line 982) | public Element prependText(String text) {
method append (line 995) | public Element append(String html) {
method prepend (line 1008) | public Element prepend(String html) {
method before (line 1022) | @Override
method before (line 1033) | @Override
method after (line 1045) | @Override
method after (line 1056) | @Override
method empty (line 1066) | @Override
method wrap (line 1082) | @Override
method uniqueIdSelector (line 1092) | private String uniqueIdSelector(@Nullable Document ownerDoc) {
method cssSelector (line 1115) | public String cssSelector() {
method cssSelectorComponent (line 1135) | private String cssSelectorComponent() {
method siblingElements (line 1160) | public Elements siblingElements() {
method nextElementSiblings (line 1179) | public Elements nextElementSiblings() {
method previousElementSiblings (line 1188) | public Elements previousElementSiblings() {
method nextElementSiblings (line 1192) | private Elements nextElementSiblings(boolean next) {
method firstElementSibling (line 1204) | public Element firstElementSibling() {
method elementSiblingIndex (line 1217) | public int elementSiblingIndex() {
method lastElementSibling (line 1226) | public Element lastElementSibling() {
method indexInList (line 1234) | private static <E extends Element> int indexInList(Element search, Lis...
method firstElementChild (line 1250) | public @Nullable Element firstElementChild() {
method lastElementChild (line 1266) | public @Nullable Element lastElementChild() {
method getElementsByTag (line 1281) | public Elements getElementsByTag(String tagName) {
method getElementById (line 1297) | public @Nullable Element getElementById(String id) {
method getElementsByClass (line 1313) | public Elements getElementsByClass(String className) {
method getElementsByAttribute (line 1325) | public Elements getElementsByAttribute(String key) {
method getElementsByAttributeStarting (line 1338) | public Elements getElementsByAttributeStarting(String keyPrefix) {
method getElementsByAttributeValue (line 1352) | public Elements getElementsByAttributeValue(String key, String value) {
method getElementsByAttributeValueNot (line 1363) | public Elements getElementsByAttributeValueNot(String key, String valu...
method getElementsByAttributeValueStarting (line 1374) | public Elements getElementsByAttributeValueStarting(String key, String...
method getElementsByAttributeValueEnding (line 1385) | public Elements getElementsByAttributeValueEnding(String key, String v...
method getElementsByAttributeValueContaining (line 1396) | public Elements getElementsByAttributeValueContaining(String key, Stri...
method getElementsByAttributeValueMatching (line 1406) | public Elements getElementsByAttributeValueMatching(String key, Patter...
method getElementsByAttributeValueMatching (line 1416) | public Elements getElementsByAttributeValueMatching(String key, String...
method getElementsByIndexLessThan (line 1431) | public Elements getElementsByIndexLessThan(int index) {
method getElementsByIndexGreaterThan (line 1440) | public Elements getElementsByIndexGreaterThan(int index) {
method getElementsByIndexEquals (line 1449) | public Elements getElementsByIndexEquals(int index) {
method getElementsContainingText (line 1460) | public Elements getElementsContainingText(String searchText) {
method getElementsContainingOwnText (line 1471) | public Elements getElementsContainingOwnText(String searchText) {
method getElementsMatchingText (line 1481) | public Elements getElementsMatchingText(Pattern pattern) {
method getElementsMatchingText (line 1491) | public Elements getElementsMatchingText(String regex) {
method getElementsMatchingOwnText (line 1507) | public Elements getElementsMatchingOwnText(Pattern pattern) {
method getElementsMatchingOwnText (line 1517) | public Elements getElementsMatchingOwnText(String regex) {
method getAllElements (line 1532) | public Elements getAllElements() {
method text (line 1552) | public String text() {
class TextAccumulator (line 1558) | private static class TextAccumulator implements NodeVisitor {
method TextAccumulator (line 1561) | public TextAccumulator(StringBuilder accum) {
method head (line 1565) | @Override public void head(Node node, int depth) {
method tail (line 1578) | @Override public void tail(Node node, int depth) {
method wholeText (line 1597) | public String wholeText() {
method nodeValue (line 1604) | @Override
method wholeTextOf (line 1609) | private static String wholeTextOf(Stream<Node> stream) {
method wholeOwnText (line 1626) | public String wholeOwnText() {
method ownText (line 1641) | public String ownText() {
method ownText (line 1647) | private void ownText(StringBuilder accum) {
method appendNormalisedText (line 1659) | private static void appendNormalisedText(StringBuilder accum, TextNode...
method preserveWhitespace (line 1667) | static boolean preserveWhitespace(@Nullable Node node) {
method text (line 1689) | public Element text(String text) {
method hasText (line 1705) | public boolean hasText() {
method data (line 1729) | public String data() {
method className (line 1753) | public String className() {
method classNames (line 1763) | public Set<String> classNames() {
method classNames (line 1776) | public Element classNames(Set<String> classNames) {
method hasClass (line 1792) | public boolean hasClass(String className) {
method addClass (line 1843) | public Element addClass(String className) {
method removeClass (line 1858) | public Element removeClass(String className) {
method toggleClass (line 1873) | public Element toggleClass(String className) {
method val (line 1890) | public String val() {
method val (line 1902) | public Element val(String value) {
method endSourceRange (line 1919) | public Range endSourceRange() {
method outerHtmlHead (line 1923) | @Override
method outerHtmlTail (line 1943) | @Override
method safeTagName (line 1951) | @Nullable private String safeTagName(Document.OutputSettings.Syntax sy...
method html (line 1962) | public String html() {
method html (line 1969) | @Override
method html (line 1988) | public Element html(String html) {
method clone (line 1994) | @Override
method shallowClone (line 1999) | @Override
method doClone (line 2007) | @Override
method clearAttributes (line 2022) | @Override
method removeAttr (line 2033) | @Override
method root (line 2038) | @Override
method traverse (line 2043) | @Override
method forEachNode (line 2048) | @Override
method forEach (line 2059) | @Override
method iterator (line 2068) | @Override
method filter (line 2073) | @Override
class NodeList (line 2078) | static final class NodeList extends ArrayList<Node> {
method NodeList (line 2082) | public NodeList(int size) {
method modCount (line 2087) | int modCount() {
method incrementMod (line 2091) | void incrementMod() {
method reindexChildren (line 2096) | void reindexChildren() {
method invalidateChildren (line 2104) | void invalidateChildren() {
method hasValidChildren (line 2108) | boolean hasValidChildren() {
FILE: src/main/java/org/jsoup/nodes/Entities.java
class Entities (line 25) | public class Entities {
type EscapeMode (line 42) | public enum EscapeMode {
method EscapeMode (line 70) | EscapeMode(String file, int size) {
method codepointForName (line 74) | int codepointForName(final String name) {
method nameForCodepoint (line 79) | String nameForCodepoint(final int codepoint) {
method Entities (line 91) | private Entities() {
method isNamedEntity (line 100) | public static boolean isNamedEntity(final String name) {
method isBaseNamedEntity (line 111) | public static boolean isBaseNamedEntity(final String name) {
method getByName (line 121) | public static String getByName(String name) {
method codepointsForName (line 131) | public static int codepointsForName(final String name, final int[] cod...
method findPrefix (line 151) | public static String findPrefix(String input) {
method escape (line 168) | public static String escape(String data, OutputSettings out) {
method escape (line 179) | public static String escape(String data) {
method escapeString (line 183) | private static String escapeString(String data, EscapeMode escapeMode,...
method escape (line 190) | static void escape(QuietAppendable accum, String data, OutputSettings ...
method doEscape (line 194) | private static void doEscape(String data, QuietAppendable accum, Escap...
method appendEscaped (line 230) | private static void appendEscaped(int codePoint, QuietAppendable accum...
method appendNbsp (line 286) | private static void appendNbsp(QuietAppendable accum, EscapeMode escap...
method appendApos (line 291) | private static void appendApos(QuietAppendable accum, int options, Esc...
method appendEncoded (line 300) | private static void appendEncoded(QuietAppendable accum, EscapeMode es...
method unescape (line 314) | public static String unescape(String string) {
method unescape (line 325) | static String unescape(String string, boolean strict) {
method canEncode (line 342) | private static boolean canEncode(final CoreCharset charset, final char...
method isValidXmlChar (line 354) | private static boolean isValidXmlChar(int codePoint) {
type CoreCharset (line 361) | enum CoreCharset {
method byName (line 364) | static CoreCharset byName(final String name) {
method encoderFor (line 375) | private static CharsetEncoder encoderFor(Charset charset) {
method load (line 384) | private static void load(EscapeMode e, String pointsData, int size) {
FILE: src/main/java/org/jsoup/nodes/EntitiesData.java
class EntitiesData (line 6) | class EntitiesData {
FILE: src/main/java/org/jsoup/nodes/FormElement.java
class FormElement (line 22) | public class FormElement extends Element {
method FormElement (line 34) | public FormElement(Tag tag, @Nullable String baseUri, @Nullable Attrib...
method elements (line 42) | public Elements elements() {
method addElement (line 59) | public FormElement addElement(Element element) {
method removeChild (line 64) | @Override
method submit (line 80) | public Connection submit() {
method formData (line 98) | public List<Connection.KeyVal> formData() {
method clone (line 137) | @Override
FILE: src/main/java/org/jsoup/nodes/LeafNode.java
class LeafNode (line 12) | public abstract class LeafNode extends Node {
method LeafNode (line 15) | public LeafNode() {
method LeafNode (line 19) | protected LeafNode(String coreValue) {
method hasAttributes (line 24) | @Override protected final boolean hasAttributes() {
method attributes (line 28) | @Override
method ensureAttributes (line 34) | private void ensureAttributes() {
method coreValue (line 43) | String coreValue() {
method parent (line 47) | @Override @Nullable
method nodeValue (line 52) | @Override
method coreValue (line 57) | void coreValue(String value) {
method attr (line 61) | @Override
method attr (line 69) | @Override
method hasAttr (line 80) | @Override
method removeAttr (line 86) | @Override
method absUrl (line 92) | @Override
method baseUri (line 98) | @Override
method doSetBaseUri (line 103) | @Override
method childNodeSize (line 108) | @Override
method empty (line 113) | @Override
method ensureChildNodes (line 118) | @Override
method outerHtmlTail (line 123) | @Override
method doClone (line 126) | @Override
FILE: src/main/java/org/jsoup/nodes/Node.java
class Node (line 26) | public abstract class Node implements Cloneable {
method Node (line 35) | protected Node() {
method nodeName (line 42) | public abstract String nodeName();
method normalName (line 50) | public String normalName() {
method nodeValue (line 59) | public String nodeValue() {
method nameIs (line 69) | public boolean nameIs(String normalName) {
method parentNameIs (line 79) | public boolean parentNameIs(String normalName) {
method parentElementIs (line 90) | public boolean parentElementIs(String normalName, String namespace) {
method hasAttributes (line 98) | protected abstract boolean hasAttributes();
method hasParent (line 105) | public boolean hasParent() {
method attr (line 124) | public String attr(String attributeKey) {
method attributes (line 141) | public abstract Attributes attributes();
method attributesSize (line 148) | public int attributesSize() {
method attr (line 160) | public Node attr(String attributeKey, String attributeValue) {
method hasAttr (line 173) | public boolean hasAttr(String attributeKey) {
method removeAttr (line 191) | public Node removeAttr(String attributeKey) {
method clearAttributes (line 202) | public Node clearAttributes() {
method baseUri (line 220) | public abstract String baseUri();
method doSetBaseUri (line 226) | protected abstract void doSetBaseUri(String baseUri);
method setBaseUri (line 232) | public void setBaseUri(final String baseUri) {
method absUrl (line 260) | public String absUrl(String attributeKey) {
method ensureChildNodes (line 268) | protected abstract List<Node> ensureChildNodes();
method childNode (line 276) | public Node childNode(int index) {
method childNodes (line 285) | public List<Node> childNodes() {
method childNodesCopy (line 300) | public List<Node> childNodesCopy() {
method childNodeSize (line 313) | public abstract int childNodeSize();
method childNodesAsArray (line 315) | protected Node[] childNodesAsArray() {
method empty (line 323) | public abstract Node empty();
method parent (line 331) | public @Nullable Node parent() {
method parentElement (line 341) | public @Nullable Element parentElement() {
method parentNode (line 349) | public @Nullable final Node parentNode() {
method root (line 357) | public Node root() {
method ownerDocument (line 368) | public @Nullable Document ownerDocument() {
method remove (line 381) | public void remove() {
method before (line 392) | public Node before(String html) {
method before (line 403) | public Node before(Node node) {
method after (line 420) | public Node after(String html) {
method after (line 431) | public Node after(Node node) {
method addSiblingHtml (line 442) | private void addSiblingHtml(int index, String html) {
method wrap (line 458) | public Node wrap(String html) {
method unwrap (line 509) | public @Nullable Node unwrap() {
method getDeepChild (line 518) | private static Element getDeepChild(Element el) {
method replaceWith (line 531) | public void replaceWith(Node in) {
method setParentNode (line 538) | protected void setParentNode(Node parentNode) {
method replaceChild (line 546) | protected void replaceChild(Node out, Node in) {
method removeChild (line 563) | protected void removeChild(Node out) {
method addChildren (line 575) | protected void addChildren(Node... children) {
method addChildren (line 586) | protected void addChildren(int index, Node... children) {
method reparentChild (line 626) | protected void reparentChild(Node child) {
method siblingNodes (line 635) | public List<Node> siblingNodes() {
method nextSibling (line 651) | public @Nullable Node nextSibling() {
method previousSibling (line 669) | public @Nullable Node previousSibling() {
method siblingIndex (line 685) | public int siblingIndex() {
method setSiblingIndex (line 692) | protected void setSiblingIndex(int siblingIndex) {
method firstChild (line 704) | public @Nullable Node firstChild() {
method lastChild (line 716) | public @Nullable Node lastChild() {
method firstSibling (line 729) | public Node firstSibling() {
method lastSibling (line 743) | public Node lastSibling() {
method nextElementSibling (line 759) | public @Nullable Element nextElementSibling() {
method previousElementSibling (line 773) | public @Nullable Element previousElementSibling() {
method traverse (line 786) | public Node traverse(NodeVisitor nodeVisitor) {
method forEachNode (line 799) | public Node forEachNode(Consumer<? super Node> action) {
method filter (line 810) | public Node filter(NodeFilter nodeFilter) {
method nodeStream (line 822) | public Stream<Node> nodeStream() {
method nodeStream (line 833) | public <T extends Node> Stream<T> nodeStream(Class<T> type) {
method outerHtml (line 843) | public String outerHtml() {
method outerHtml (line 849) | protected void outerHtml(Appendable accum) {
method outerHtml (line 853) | protected void outerHtml(QuietAppendable accum) {
method outerHtmlHead (line 864) | abstract void outerHtmlHead(final QuietAppendable accum, final Documen...
method outerHtmlTail (line 866) | abstract void outerHtmlTail(final QuietAppendable accum, final Documen...
method html (line 875) | public <T extends Appendable> T html(T appendable) {
method sourceRange (line 891) | public Range sourceRange() {
method toString (line 900) | @Override
method indent (line 906) | @Deprecated
method equals (line 918) | @Override
method hashCode (line 929) | @Override
method hasSameValue (line 941) | public boolean hasSameValue(@Nullable Object o) {
method clone (line 961) | @SuppressWarnings("MethodDoesntCallSuperMethod")
method shallowClone (line 992) | public Node shallowClone() {
method doClone (line 1000) | protected Node doClone(@Nullable Node parent) {
FILE: src/main/java/org/jsoup/nodes/NodeIterator.java
class NodeIterator (line 17) | public class NodeIterator<T extends Node> implements Iterator<T> {
method NodeIterator (line 31) | public NodeIterator(Node start, Class<T> type) {
method from (line 44) | public static NodeIterator<Node> from(Node start) {
method restart (line 53) | public void restart(Node start) {
method hasNext (line 62) | @Override public boolean hasNext() {
method next (line 67) | @Override public T next() {
method maybeFindNext (line 82) | private void maybeFindNext() {
method findNextNode (line 92) | private @Nullable T findNextNode() {
method remove (line 121) | @Override public void remove() {
FILE: src/main/java/org/jsoup/nodes/NodeUtils.java
class NodeUtils (line 20) | final class NodeUtils {
method outputSettings (line 25) | static Document.OutputSettings outputSettings(Node node) {
method parser (line 33) | static Parser parser(Node node) {
method selectXpath (line 44) | static <T extends Node> List<T> selectXpath(String xpath, Element el, ...
method stream (line 57) | static <T extends Node> Stream<T> stream(Node start, Class<T> type) {
method spliterator (line 64) | static <T extends Node> Spliterator<T> spliterator(Iterator<T> iterato...
FILE: src/main/java/org/jsoup/nodes/Printer.java
class Printer (line 11) | class Printer implements NodeVisitor {
method Printer (line 16) | Printer(Node root, QuietAppendable accum, OutputSettings settings) {
method addHead (line 22) | void addHead(Element el, int depth) {
method addTail (line 26) | void addTail(Element el, int depth) {
method addText (line 30) | void addText(TextNode textNode, int textOptions, int depth) {
method addNode (line 35) | void addNode(LeafNode node, int depth) {
method indent (line 39) | void indent(int depth) {
method head (line 43) | @Override
method tail (line 50) | @Override
class Pretty (line 58) | static class Pretty extends Printer {
method Pretty (line 61) | Pretty(Node root, QuietAppendable accum, OutputSettings settings) {
method addHead (line 73) | @Override
method addTail (line 81) | @Override
method addNode (line 97) | @Override
method addText (line 104) | @Override
method textTrim (line 117) | int textTrim(TextNode node, int options) {
method shouldIndent (line 140) | boolean shouldIndent(@Nullable Node node) {
method isBlockEl (line 158) | boolean isBlockEl(@Nullable Node node) {
method hasChildBlocks (line 174) | static boolean hasChildBlocks(Element el) {
method hasNonTextNodes (line 184) | static boolean hasNonTextNodes(Element el) {
method previousNonblank (line 193) | static @Nullable Node previousNonblank(Node node) {
method nextNonBlank (line 199) | static @Nullable Node nextNonBlank(@Nullable Node node) {
method isBlankText (line 204) | static boolean isBlankText(@Nullable Node node) {
method tagIs (line 208) | static boolean tagIs(int option, @Nullable Node node) {
class Outline (line 214) | static class Outline extends Pretty {
method Outline (line 215) | Outline(Node root, QuietAppendable accum, OutputSettings settings) {
method isBlockEl (line 219) | @Override
method shouldIndent (line 224) | @Override
method printerFor (line 235) | static Printer printerFor(Node root, QuietAppendable accum) {
FILE: src/main/java/org/jsoup/nodes/PseudoTextElement.java
class PseudoTextElement (line 12) | @Deprecated
method PseudoTextElement (line 15) | public PseudoTextElement(Tag tag, String baseUri, Attributes attribute...
method outerHtmlHead (line 19) | @Override
method outerHtmlTail (line 23) | @Override
FILE: src/main/java/org/jsoup/nodes/Range.java
class Range (line 16) | public class Range {
method Range (line 28) | public Range(Position start, Position end) {
method start (line 37) | public Position start() {
method startPos (line 46) | public int startPos() {
method end (line 54) | public Position end() {
method endPos (line 63) | public int endPos() {
method isTracked (line 71) | public boolean isTracked() {
method isImplicit (line 84) | public boolean isImplicit() {
method of (line 95) | static Range of(Node node, boolean start) {
method equals (line 102) | @Override
method hashCode (line 113) | @Override
method toString (line 122) | @Override
class Position (line 133) | public static class Position {
method Position (line 142) | public Position(int pos, int lineNumber, int columnNumber) {
method pos (line 153) | public int pos() {
method lineNumber (line 161) | public int lineNumber() {
method columnNumber (line 170) | public int columnNumber() {
method isTracked (line 178) | public boolean isTracked() {
method toString (line 186) | @Override
method equals (line 191) | @Override
method hashCode (line 201) | @Override
class AttributeRange (line 207) | public static class AttributeRange {
method AttributeRange (line 214) | public AttributeRange(Range nameRange, Range valueRange) {
method nameRange (line 220) | public Range nameRange() {
method valueRange (line 225) | public Range valueRange() {
method toString (line 232) | @Override public String toString() {
method equals (line 240) | @Override public boolean equals(Object o) {
method hashCode (line 250) | @Override public int hashCode() {
FILE: src/main/java/org/jsoup/nodes/TextNode.java
class TextNode (line 12) | public class TextNode extends LeafNode {
method TextNode (line 19) | public TextNode(String text) {
method nodeName (line 23) | @Override public String nodeName() {
method text (line 32) | public String text() {
method text (line 41) | public TextNode text(String text) {
method getWholeText (line 50) | public String getWholeText() {
method isBlank (line 58) | public boolean isBlank() {
method splitText (line 68) | public TextNode splitText(int offset) {
method outerHtmlHead (line 83) | @Override
method toString (line 88) | @Override
method clone (line 93) | @Override
method createFromEncoded (line 103) | public static TextNode createFromEncoded(String encodedText) {
method normaliseWhitespace (line 108) | static String normaliseWhitespace(String text) {
method stripLeadingWhitespace (line 113) | static String stripLeadingWhitespace(String text) {
method lastCharIsWhitespace (line 117) | static boolean lastCharIsWhitespace(StringBuilder sb) {
FILE: src/main/java/org/jsoup/nodes/XmlDeclaration.java
class XmlDeclaration (line 10) | public class XmlDeclaration extends LeafNode {
method XmlDeclaration (line 23) | public XmlDeclaration(String name, boolean isDeclaration) {
method nodeName (line 28) | @Override public String nodeName() {
method name (line 36) | public String name() {
method getWholeDeclaration (line 44) | public String getWholeDeclaration() {
method getWholeDeclaration (line 50) | private void getWholeDeclaration(QuietAppendable accum, Document.Outpu...
method outerHtmlHead (line 67) | @Override
method outerHtmlTail (line 79) | @Override
method toString (line 83) | @Override
method clone (line 88) | @Override
FILE: src/main/java/org/jsoup/parser/CharacterReader.java
class CharacterReader (line 22) | public final class CharacterReader implements AutoCloseable {
method CharacterReader (line 47) | public CharacterReader(Reader input, int sz) {
method CharacterReader (line 51) | public CharacterReader(Reader input) {
method CharacterReader (line 59) | public CharacterReader(String input) {
method close (line 63) | @Override
method bufferUp (line 80) | private void bufferUp() {
method doBufferUp (line 90) | private void doBufferUp() {
method mark (line 125) | void mark() {
method unmark (line 134) | void unmark() {
method rewindToMark (line 138) | void rewindToMark() {
method pos (line 150) | public int pos() {
method readFully (line 155) | boolean readFully() {
method trackNewlines (line 167) | public void trackNewlines(boolean track) {
method isTrackNewlines (line 181) | public boolean isTrackNewlines() {
method lineNumber (line 191) | public int lineNumber() {
method lineNumber (line 195) | int lineNumber(int pos) {
method columnNumber (line 213) | public int columnNumber() {
method columnNumber (line 217) | int columnNumber(int pos) {
method posLineCol (line 234) | String posLineCol() {
method lineNumIndex (line 238) | private int lineNumIndex(int pos) {
method scanBufferForNewlines (line 248) | private void scanBufferForNewlines() {
method isEmpty (line 272) | public boolean isEmpty() {
method isEmptyNoBufferUp (line 277) | private boolean isEmptyNoBufferUp() {
method current (line 285) | public char current() {
method consume (line 294) | public char consume() {
method unconsume (line 304) | void unconsume() {
method advance (line 314) | public void advance() {
method nextIndexOf (line 323) | int nextIndexOf(char c) {
method nextIndexOf (line 339) | int nextIndexOf(CharSequence seq) {
method consumeTo (line 363) | public String consumeTo(char c) {
method consumeTo (line 381) | public String consumeTo(String seq) {
method consumeMatching (line 404) | String consumeMatching(CharPredicate func) {
method consumeMatching (line 414) | String consumeMatching(CharPredicate func, int maxLength) {
method consumeToAny (line 434) | public String consumeToAny(final char... chars) {
method consumeToAnySorted (line 442) | String consumeToAnySorted(final char... chars) {
method consumeData (line 446) | String consumeData() {
method consumeAttributeQuoted (line 451) | String consumeAttributeQuoted(final boolean single) {
method consumeRawData (line 456) | String consumeRawData() {
method consumeTagName (line 461) | String consumeTagName() {
method consumeToEnd (line 479) | String consumeToEnd() {
method consumeLetterSequence (line 486) | String consumeLetterSequence() {
method consumeLetterThenDigitSequence (line 490) | String consumeLetterThenDigitSequence() {
method consumeHexSequence (line 505) | String consumeHexSequence() {
method consumeDigitSequence (line 509) | String consumeDigitSequence() {
method matches (line 513) | boolean matches(char c) {
method matches (line 517) | boolean matches(String seq) {
method matchesIgnoreCase (line 529) | boolean matchesIgnoreCase(String seq) {
method matchesAny (line 552) | boolean matchesAny(char... seq) {
method matchesAnySorted (line 565) | boolean matchesAnySorted(char[] seq) {
method matchesAsciiAlpha (line 574) | boolean matchesAsciiAlpha() {
method matchesDigit (line 579) | boolean matchesDigit() {
method matchConsume (line 584) | boolean matchConsume(String seq) {
method matchConsumeIgnoreCase (line 594) | boolean matchConsumeIgnoreCase(String seq) {
method containsIgnoreCase (line 610) | boolean containsIgnoreCase(String seq) {
method toString (line 630) | @Override
method cacheString (line 643) | private static String cacheString(final char[] charBuf, final String[]...
method rangeEquals (line 673) | static boolean rangeEquals(final char[] charBuf, final int start, int ...
method rangeEquals (line 687) | boolean rangeEquals(final int start, final int count, final String cac...
type CharPredicate (line 691) | @FunctionalInterface
method test (line 693) | boolean test(char c);
FILE: src/main/java/org/jsoup/parser/HtmlTreeBuilder.java
class HtmlTreeBuilder (line 29) | public class HtmlTreeBuilder extends TreeBuilder {
method defaultSettings (line 83) | @Override ParseSettings defaultSettings() {
method newInstance (line 87) | @Override
method initialiseParse (line 92) | @Override
method initialiseParseFragment (line 112) | @Override void initialiseParseFragment(@Nullable Element context) {
method completeParseFragment (line 160) | @Override List<Node> completeParseFragment() {
method process (line 173) | @Override
method useCurrentOrForeignInsert (line 179) | boolean useCurrentOrForeignInsert(Token token) {
method isMathmlTextIntegration (line 218) | static boolean isMathmlTextIntegration(Element el) {
method isHtmlIntegration (line 231) | static boolean isHtmlIntegration(Element el) {
method process (line 250) | boolean process(Token token, HtmlTreeBuilderState state) {
method transition (line 254) | void transition(HtmlTreeBuilderState state) {
method state (line 258) | HtmlTreeBuilderState state() {
method markInsertionMode (line 262) | void markInsertionMode() {
method originalState (line 266) | HtmlTreeBuilderState originalState() {
method framesetOk (line 270) | void framesetOk(boolean framesetOk) {
method framesetOk (line 274) | boolean framesetOk() {
method getDocument (line 278) | Document getDocument() {
method getBaseUri (line 282) | String getBaseUri() {
method maybeSetBaseUri (line 286) | void maybeSetBaseUri(Element base) {
method isFragmentParsing (line 298) | boolean isFragmentParsing() {
method error (line 302) | void error(HtmlTreeBuilderState state) {
method createElementFor (line 308) | Element createElementFor(Token.StartTag startTag, String namespace, bo...
method insertElementFor (line 329) | Element insertElementFor(final Token.StartTag startTag) {
method insertForeignElementFor (line 359) | Element insertForeignElementFor(final Token.StartTag startTag, String ...
method insertEmptyElementFor (line 371) | Element insertEmptyElementFor(Token.StartTag startTag) {
method insertFormElement (line 378) | FormElement insertFormElement(Token.StartTag startTag, boolean onStack...
method doInsertElement (line 396) | private void doInsertElement(Element el) {
method insertCommentNode (line 414) | void insertCommentNode(Token.Comment token) {
method insertCharacterNode (line 421) | void insertCharacterNode(Token.Character characterToken) {
method insertCharacterNode (line 432) | void insertCharacterNode(Token.Character characterToken, boolean repla...
method insertCharacterToElement (line 439) | void insertCharacterToElement(Token.Character characterToken, Element ...
method getStack (line 453) | ArrayList<Element> getStack() {
method onStack (line 457) | boolean onStack(Element el) {
method onStack (line 462) | boolean onStack(String elName) {
method onStack (line 467) | private static boolean onStack(ArrayList<Element> queue, Element eleme...
method getFromStack (line 480) | @Nullable
method removeFromStack (line 493) | boolean removeFromStack(Element el) {
method onStackPrunedForDepth (line 505) | @Override
method popStackToClose (line 520) | @Nullable
method popStackToCloseAnyNamespace (line 532) | @Nullable
method popStackToClose (line 544) | void popStackToClose(String... elNames) { // elnames is sorted, comes ...
method clearStackToTableContext (line 553) | void clearStackToTableContext() {
method clearStackToTableBodyContext (line 557) | void clearStackToTableBodyContext() {
method clearStackToTableRowContext (line 561) | void clearStackToTableRowContext() {
method clearStackToContext (line 566) | private void clearStackToContext(String... nodeNames) {
method aboveOnStack (line 584) | @Nullable Element aboveOnStack(Element el) {
method insertOnStackAfter (line 595) | void insertOnStackAfter(Element after, Element in) {
method replaceOnStack (line 606) | void replaceOnStack(Element out, Element in) {
method replaceInQueue (line 610) | private static void replaceInQueue(ArrayList<Element> queue, Element o...
method resetInsertionMode (line 621) | boolean resetInsertionMode() {
method resetBody (line 702) | void resetBody() {
method inSpecificScope (line 712) | private boolean inSpecificScope(String targetName, String[] baseTypes,...
method inSpecificScope (line 717) | private boolean inSpecificScope(String[] targetNames, String[] baseTyp...
method inScope (line 744) | boolean inScope(String[] targetNames) {
method inScope (line 748) | boolean inScope(String targetName) {
method inScope (line 752) | boolean inScope(String targetName, String[] extras) {
method inListItemScope (line 756) | boolean inListItemScope(String targetName) {
method inButtonScope (line 760) | boolean inButtonScope(String targetName) {
method inTableScope (line 764) | boolean inTableScope(String targetName) {
method inSelectScope (line 768) | boolean inSelectScope(String targetName) {
method onStackNot (line 781) | boolean onStackNot(String[] allowedTags) {
method setHeadElement (line 790) | void setHeadElement(Element headElement) {
method getHeadElement (line 794) | Element getHeadElement() {
method isFosterInserts (line 798) | boolean isFosterInserts() {
method setFosterInserts (line 802) | void setFosterInserts(boolean fosterInserts) {
method getFormElement (line 806) | @Nullable FormElement getFormElement() {
method setFormElement (line 810) | void setFormElement(FormElement formElement) {
method resetPendingTableCharacters (line 814) | void resetPendingTableCharacters() {
method getPendingTableCharacters (line 818) | List<Token.Character> getPendingTableCharacters() {
method addPendingTableCharacters (line 822) | void addPendingTableCharacters(Token.Character c) {
method generateImpliedEndTags (line 839) | void generateImpliedEndTags(String excludeTag) {
method generateImpliedEndTags (line 847) | void generateImpliedEndTags() {
method generateImpliedEndTags (line 855) | void generateImpliedEndTags(boolean thorough) {
method closeElement (line 863) | void closeElement(String name) {
method isSpecial (line 869) | static boolean isSpecial(Element el) {
method lastFormattingElement (line 884) | Element lastFormattingElement() {
method positionOfElement (line 888) | int positionOfElement(Element el){
method removeLastFormattingElement (line 896) | Element removeLastFormattingElement() {
method pushActiveFormattingElements (line 905) | void pushActiveFormattingElements(Element in) {
method pushWithBookmark (line 910) | void pushWithBookmark(Element in, int bookmark){
method checkActiveFormattingElements (line 920) | void checkActiveFormattingElements(Element in){
method isSameFormattingElement (line 940) | private static boolean isSameFormattingElement(Element a, Element b) {
method reconstructFormattingElements (line 948) | void reconstructFormattingElements() {
method clearFormattingElementsToLastMarker (line 989) | void clearFormattingElementsToLastMarker() {
method removeFromActiveFormattingElements (line 997) | void removeFromActiveFormattingElements(Element el) {
method isInActiveFormattingElements (line 1007) | boolean isInActiveFormattingElements(Element el) {
method getActiveFormattingElement (line 1011) | @Nullable
method replaceActiveFormattingElement (line 1023) | void replaceActiveFormattingElement(Element out, Element in) {
method insertMarkerToFormattingElements (line 1027) | void insertMarkerToFormattingElements() {
method insertInFosterParent (line 1031) | void insertInFosterParent(Node in) {
method pushTemplateMode (line 1054) | void pushTemplateMode(HtmlTreeBuilderState state) {
method popTemplateMode (line 1058) | @Nullable HtmlTreeBuilderState popTemplateMode() {
method templateModeSize (line 1066) | int templateModeSize() {
method currentTemplateMode (line 1070) | @Nullable HtmlTreeBuilderState currentTemplateMode() {
method toString (line 1074) | @Override
FILE: src/main/java/org/jsoup/parser/HtmlTreeBuilderState.java
type HtmlTreeBuilderState (line 23) | enum HtmlTreeBuilderState {
method process (line 25) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method process (line 52) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method anythingElse (line 74) | private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
method process (line 81) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method process (line 109) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method anythingElse (line 192) | private boolean anythingElse(Token t, TreeBuilder tb) {
method process (line 198) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method anythingElse (line 220) | private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
method process (line 230) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method anythingElse (line 278) | private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
method process (line 285) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method inBodyStartTag (line 324) | private boolean inBodyStartTag(Token t, HtmlTreeBuilder tb) {
method inBodyEndTag (line 652) | private boolean inBodyEndTag(Token t, HtmlTreeBuilder tb) {
method anyOtherEndTag (line 798) | boolean anyOtherEndTag(Token t, HtmlTreeBuilder tb) {
method inBodyEndTagAdoption (line 827) | private boolean inBodyEndTagAdoption(Token t, HtmlTreeBuilder tb) {
method process (line 987) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method process (line 1007) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method anythingElse (line 1104) | boolean anythingElse(Token t, HtmlTreeBuilder tb) {
method process (line 1113) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method process (line 1145) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method process (line 1182) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method anythingElse (line 1240) | private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
method process (line 1252) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method exitTableBody (line 1298) | private boolean exitTableBody(Token t, HtmlTreeBuilder tb) {
method anythingElse (line 1309) | private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
method process (line 1314) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method anythingElse (line 1382) | private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
method process (line 1387) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method anythingElse (line 1431) | private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
method closeCell (line 1435) | private void closeCell(HtmlTreeBuilder tb) {
method process (line 1443) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method anythingElse (line 1533) | private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
method process (line 1539) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method process (line 1559) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method process (line 1630) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method process (line 1664) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method process (line 1712) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method process (line 1736) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method process (line 1756) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method process (line 1774) | @Override boolean process(Token t, HtmlTreeBuilder tb) {
method processAsHtml (line 1859) | boolean processAsHtml(Token t, HtmlTreeBuilder tb) {
method mergeAttributes (line 1864) | private static void mergeAttributes(Token.StartTag source, Element des...
method process (line 1880) | abstract boolean process(Token t, HtmlTreeBuilder tb);
method isWhitespace (line 1882) | private static boolean isWhitespace(Token t) {
method HandleTextState (line 1890) | private static void HandleTextState(Token.StartTag startTag, HtmlTreeB...
class Constants (line 1899) | static final class Constants {
FILE: src/main/java/org/jsoup/parser/ParseError.java
class ParseError (line 6) | public class ParseError {
method ParseError (line 11) | ParseError(CharacterReader reader, String errorMsg) {
method ParseError (line 17) | ParseError(CharacterReader reader, String errorFormat, Object... args) {
method ParseError (line 23) | ParseError(int pos, String errorMsg) {
method ParseError (line 29) | ParseError(int pos, String errorFormat, Object... args) {
method getErrorMessage (line 39) | public String getErrorMessage() {
method getPosition (line 47) | public int getPosition() {
method getCursorPos (line 55) | public String getCursorPos() {
method toString (line 59) | @Override
FILE: src/main/java/org/jsoup/parser/ParseErrorList.java
class ParseErrorList (line 10) | public class ParseErrorList extends ArrayList<ParseError>{
method ParseErrorList (line 15) | ParseErrorList(int initialCapacity, int maxSize) {
method ParseErrorList (line 25) | ParseErrorList(ParseErrorList copy) {
method canAddError (line 29) | boolean canAddError() {
method getMaxSize (line 33) | int getMaxSize() {
method noTracking (line 37) | public static ParseErrorList noTracking() {
method tracking (line 41) | public static ParseErrorList tracking(int maxSize) {
method clone (line 45) | @Override
FILE: src/main/java/org/jsoup/parser/ParseSettings.java
class ParseSettings (line 12) | public class ParseSettings {
method preserveTagCase (line 33) | public boolean preserveTagCase() {
method preserveAttributeCase (line 40) | public boolean preserveAttributeCase() {
method ParseSettings (line 49) | public ParseSettings(boolean tag, boolean attribute) {
method ParseSettings (line 54) | ParseSettings(ParseSettings copy) {
method normalizeTag (line 61) | public String normalizeTag(String name) {
method normalizeAttribute (line 71) | public String normalizeAttribute(String name) {
method normalizeAttributes (line 78) | void normalizeAttributes(Attributes attributes) {
method normalName (line 85) | static String normalName(String name) {
FILE: src/main/java/org/jsoup/parser/Parser.java
class Parser (line 21) | public class Parser implements Cloneable {
method Parser (line 39) | public Parser(TreeBuilder treeBuilder) {
method newInstance (line 50) | public Parser newInstance() {
method clone (line 54) | @SuppressWarnings("MethodDoesntCallSuperMethod") // because we use the...
method Parser (line 60) | private Parser(Parser copy) {
method parseInput (line 76) | public Document parseInput(String html, String baseUri) {
method parseInput (line 88) | public Document parseInput(Reader inputHtml, String baseUri) {
method parseFragmentInput (line 105) | public List<Node> parseFragmentInput(String fragment, @Nullable Elemen...
method parseFragmentInput (line 118) | public List<Node> parseFragmentInput(Reader fragment, @Nullable Elemen...
method getTreeBuilder (line 132) | public TreeBuilder getTreeBuilder() {
method isTrackErrors (line 140) | public boolean isTrackErrors() {
method setTrackErrors (line 149) | public Parser setTrackErrors(int maxErrors) {
method getErrors (line 159) | public ParseErrorList getErrors() {
method isTrackPosition (line 168) | public boolean isTrackPosition() {
method setTrackPosition (line 178) | public Parser setTrackPosition(boolean trackPosition) {
method settings (line 188) | public Parser settings(ParseSettings settings) {
method settings (line 197) | public ParseSettings settings() {
method setMaxDepth (line 209) | public Parser setMaxDepth(int maxDepth) {
method getMaxDepth (line 219) | public int getMaxDepth() {
method tagSet (line 232) | public Parser tagSet(TagSet tagSet) {
method tagSet (line 243) | public TagSet tagSet() {
method defaultNamespace (line 249) | public String defaultNamespace() {
method parse (line 262) | public static Document parse(String html, String baseUri) {
method parseFragment (line 277) | public static List<Node> parseFragment(String fragmentHtml, Element co...
method parseFragment (line 293) | public static List<Node> parseFragment(String fragmentHtml, Element co...
method parseXmlFragment (line 307) | public static List<Node> parseXmlFragment(String fragmentXml, String b...
method parseBodyFragment (line 320) | public static Document parseBodyFragment(String bodyHtml, String baseU...
method unescapeEntities (line 338) | public static String unescapeEntities(String string, boolean inAttribu...
method unescape (line 354) | public String unescape(String string, boolean inAttribute) {
method htmlParser (line 369) | public static Parser htmlParser() {
method xmlParser (line 378) | public static Parser xmlParser() {
FILE: src/main/java/org/jsoup/parser/StreamParser.java
class StreamParser (line 57) | public class StreamParser implements Closeable {
method StreamParser (line 68) | public StreamParser(Parser parser) {
method parse (line 80) | public StreamParser parse(Reader input, String baseUri) {
method parse (line 94) | public StreamParser parse(String input, String baseUri) {
method parseFragment (line 106) | public StreamParser parseFragment(Reader input, @Nullable Element cont...
method parseFragment (line 120) | public StreamParser parseFragment(String input, @Nullable Element cont...
method stream (line 135) | public Stream<Element> stream() {
method iterator (line 151) | public Iterator<Element> iterator() {
method stop (line 160) | public StreamParser stop() {
method close (line 170) | @Override public void close() {
method document (line 179) | public Document document() {
method complete (line 190) | public Document complete() throws IOException {
method completeFragment (line 203) | public List<Node> completeFragment() throws IOException {
method selectFirst (line 216) | public @Nullable Element selectFirst(String query) throws IOException {
method expectFirst (line 228) | public Element expectFirst(String query) throws IOException {
method selectFirst (line 246) | public @Nullable Element selectFirst(Evaluator eval) throws IOException {
method selectNext (line 264) | public @Nullable Element selectNext(String query) throws IOException {
method expectNext (line 276) | public Element expectNext(String query) throws IOException {
method selectNext (line 294) | public @Nullable Element selectNext(Evaluator eval) throws IOException {
class ElementIterator (line 307) | final class ElementIterator implements Iterator<Element>, NodeVisitor {
method reset (line 314) | void reset() {
method hasNext (line 325) | @Override public boolean hasNext() {
method next (line 334) | @Override public Element next() {
method maybeFindNext (line 342) | private void maybeFindNext() {
method remove (line 368) | @Override public void remove() {
method head (line 374) | @Override public void head(Node node, int depth) {
method tail (line 382) | @Override public void tail(Node node, int depth) {
FILE: src/main/java/org/jsoup/parser/Tag.java
class Tag (line 15) | public class Tag implements Cloneable {
method Tag (line 51) | public Tag(String tagName, String namespace) {
method Tag (line 62) | public Tag(String tagName) {
method Tag (line 67) | Tag(String tagName, String normalName, String namespace) {
method getName (line 78) | public String getName() {
method name (line 86) | public String name() {
method name (line 96) | public Tag name(String tagName) {
method prefix (line 108) | public String prefix() {
method localName (line 120) | public String localName() {
method normalName (line 130) | public String normalName() {
method namespace (line 138) | public String namespace() {
method namespace (line 148) | public Tag namespace(String namespace) {
method set (line 160) | public Tag set(int option) {
method is (line 173) | public boolean is(int option) {
method clear (line 183) | public Tag clear(int option) {
method valueOf (line 202) | public static Tag valueOf(String tagName, String namespace, ParseSetti...
method valueOf (line 216) | public static Tag valueOf(String tagName) {
method valueOf (line 231) | public static Tag valueOf(String tagName, ParseSettings settings) {
method isBlock (line 240) | public boolean isBlock() {
method formatAsBlock (line 250) | @Deprecated public boolean formatAsBlock() {
method isInline (line 259) | public boolean isInline() {
method isEmpty (line 268) | public boolean isEmpty() {
method isSelfClosing (line 277) | public boolean isSelfClosing() {
method isKnownTag (line 286) | public boolean isKnownTag() {
method isKnownTag (line 296) | public static boolean isKnownTag(String tagName) {
method preserveWhitespace (line 305) | public boolean preserveWhitespace() {
method isFormSubmittable (line 313) | public boolean isFormSubmittable() {
method setSeenSelfClose (line 317) | void setSeenSelfClose() {
method textState (line 324) | @Nullable TokeniserState textState() {
method equals (line 330) | @Override
method hashCode (line 344) | @Override
method toString (line 349) | @Override
method clone (line 354) | @Override
FILE: src/main/java/org/jsoup/parser/TagSet.java
class TagSet (line 24) | public class TagSet {
method Html (line 34) | public static TagSet Html() {
method TagSet (line 38) | private TagSet(@Nullable TagSet source, @Nullable ArrayList<Consumer<T...
method TagSet (line 43) | public TagSet() {
method TagSet (line 52) | public TagSet(TagSet template) {
method copyCustomizers (line 67) | private static @Nullable ArrayList<Consumer<Tag>> copyCustomizers(TagS...
method add (line 80) | public TagSet add(Tag tag) {
method doAdd (line 87) | private void doAdd(Tag tag) {
method get (line 106) | public @Nullable Tag get(String tagName, String namespace) {
method valueOf (line 136) | Tag valueOf(String tagName, @Nullable String normalName, String namesp...
method valueOf (line 173) | public Tag valueOf(String tagName, String namespace, ParseSettings set...
method valueOf (line 186) | public Tag valueOf(String tagName, String namespace) {
method onNewTag (line 210) | public TagSet onNewTag(Consumer<Tag> customizer) {
method equals (line 218) | @Override
method hashCode (line 225) | @Override
method initHtmlDefault (line 235) | static TagSet initHtmlDefault() {
method setupTags (line 294) | private TagSet setupTags(String namespace, String[] tagNames, Consumer...
FILE: src/main/java/org/jsoup/parser/Token.java
class Token (line 12) | abstract class Token {
method Token (line 17) | private Token(TokenType type) {
method tokenType (line 21) | String tokenType() {
method reset (line 29) | Token reset() {
method startPos (line 35) | int startPos() {
method startPos (line 39) | void startPos(int pos) {
method endPos (line 43) | int endPos() {
method endPos (line 47) | void endPos(int pos) {
class Doctype (line 51) | static final class Doctype extends Token {
method Doctype (line 58) | Doctype() {
method reset (line 62) | @Override
method getName (line 73) | String getName() {
method getPubSysKey (line 77) | @Nullable String getPubSysKey() {
method getPublicIdentifier (line 81) | String getPublicIdentifier() {
method getSystemIdentifier (line 85) | public String getSystemIdentifier() {
method isForceQuirks (line 89) | public boolean isForceQuirks() {
method toString (line 93) | @Override
class Tag (line 99) | static abstract class Tag extends Token {
method Tag (line 114) | Tag(TokenType type, TreeBuilder treeBuilder) {
method reset (line 120) | @Override
method resetPendingAttr (line 131) | private void resetPendingAttr() {
method newAttribute (line 145) | final void newAttribute() {
method trackAttributeRange (line 170) | private void trackAttributeRange(String name) {
method hasAttributes (line 195) | final boolean hasAttributes() {
method hasAttributeIgnoreCase (line 199) | final boolean hasAttributeIgnoreCase(String key) {
method finaliseTag (line 203) | final void finaliseTag() {
method name (line 211) | final String name() { // preserves case, for input into Tag.valueOf ...
method normalName (line 216) | final String normalName() { // lower case, used in tree building for...
method toStringName (line 221) | final String toStringName() {
method name (line 226) | final Tag name(String name) {
method isSelfClosing (line 232) | final boolean isSelfClosing() {
method appendTagName (line 237) | final void appendTagName(String append) {
method appendTagName (line 244) | final void appendTagName(char append) {
method appendAttributeName (line 248) | final void appendAttributeName(String append, int startPos, int endP...
method appendAttributeName (line 255) | final void appendAttributeName(char append, int startPos, int endPos) {
method appendAttributeValue (line 260) | final void appendAttributeValue(String append, int startPos, int end...
method appendAttributeValue (line 265) | final void appendAttributeValue(char append, int startPos, int endPo...
method appendAttributeValue (line 270) | final void appendAttributeValue(int[] appendCodepoints, int startPos...
method setEmptyAttributeValue (line 277) | final void setEmptyAttributeValue() {
method attrNamePos (line 281) | private void attrNamePos(int startPos, int endPos) {
method attrValPos (line 288) | private void attrValPos(int startPos, int endPos) {
method toString (line 295) | @Override
class StartTag (line 299) | final static class StartTag extends Tag {
method StartTag (line 302) | StartTag(TreeBuilder treeBuilder) {
method reset (line 306) | @Override
method nameAttr (line 313) | StartTag nameAttr(String name, Attributes attributes) {
method toString (line 320) | @Override
class EndTag (line 330) | final static class EndTag extends Tag{
method EndTag (line 331) | EndTag(TreeBuilder treeBuilder) {
method toString (line 335) | @Override
class Comment (line 341) | final static class Comment extends Token {
method reset (line 345) | @Override
method Comment (line 353) | Comment() {
method getData (line 357) | String getData() {
method append (line 361) | Comment append(String append) {
method append (line 366) | Comment append(char append) {
method toString (line 371) | @Override
class Character (line 377) | static class Character extends Token {
method Character (line 380) | Character() {
method Character (line 385) | Character(Character source) {
method reset (line 392) | @Override
method data (line 399) | Character data(String str) {
method append (line 404) | Character append(String str) {
method getData (line 409) | String getData() {
method toString (line 413) | @Override
method normalizeNulls (line 421) | public void normalizeNulls(boolean replace) {
class CData (line 434) | final static class CData extends Character {
method CData (line 435) | CData(String data) {
method toString (line 440) | @Override
class XmlDecl (line 450) | final static class XmlDecl extends Tag {
method XmlDecl (line 453) | public XmlDecl(TreeBuilder treeBuilder) {
method reset (line 457) | @Override
method toString (line 464) | @Override
class EOF (line 475) | final static class EOF extends Token {
method EOF (line 476) | EOF() {
method reset (line 480) | @Override
method toString (line 486) | @Override
method isDoctype (line 492) | final boolean isDoctype() {
method asDoctype (line 496) | final Doctype asDoctype() {
method isStartTag (line 500) | final boolean isStartTag() {
method asStartTag (line 504) | final StartTag asStartTag() {
method isEndTag (line 508) | final boolean isEndTag() {
method asEndTag (line 512) | final EndTag asEndTag() {
method isComment (line 516) | final boolean isComment() {
method asComment (line 520) | final Comment asComment() {
method isCharacter (line 524) | final boolean isCharacter() {
method isCData (line 528) | final boolean isCData() {
method asCharacter (line 532) | final Character asCharacter() {
method asXmlDecl (line 536) | final XmlDecl asXmlDecl() {
method isEOF (line 540) | final boolean isEOF() {
type TokenType (line 544) | public enum TokenType {
FILE: src/main/java/org/jsoup/parser/TokenData.java
class TokenData (line 12) | class TokenData {
method TokenData (line 16) | TokenData() {}
method set (line 18) | void set(String str) {
method append (line 23) | void append(String str) {
method append (line 34) | void append(char c) {
method appendCodePoint (line 45) | void appendCodePoint(int codepoint) {
method flipToBuilder (line 56) | private void flipToBuilder() {
method hasData (line 62) | boolean hasData() {
method reset (line 66) | void reset() {
method value (line 74) | String value() {
method toString (line 85) | @Override
FILE: src/main/java/org/jsoup/parser/TokenQueue.java
class TokenQueue (line 10) | public class TokenQueue implements AutoCloseable {
method TokenQueue (line 22) | public TokenQueue(String data) {
method isEmpty (line 30) | public boolean isEmpty() {
method consume (line 38) | public char consume() {
method advance (line 45) | public void advance() {
method current (line 49) | char current() {
method matches (line 58) | public boolean matches(String seq) {
method matches (line 63) | public boolean matches(char c) {
method matchesAny (line 72) | public boolean matchesAny(char... seq) {
method matchChomp (line 81) | public boolean matchChomp(String seq) {
method matchChomp (line 86) | public boolean matchChomp(char c) {
method matchesWhitespace (line 98) | public boolean matchesWhitespace() {
method matchesWord (line 106) | public boolean matchesWord() {
method consume (line 116) | public void consume(String seq) {
method consumeTo (line 126) | public String consumeTo(String seq) {
method consumeToAny (line 135) | public String consumeToAny(String... seq) {
method chompBalanced (line 156) | public String chompBalanced(char open, char close) {
method unescape (line 204) | public static String unescape(String in) {
method escapeCssIdentifier (line 229) | public static String escapeCssIdentifier(String in) {
method appendEscaped (line 284) | private static void appendEscaped(StringBuilder out, char c) {
method appendEscapedCodepoint (line 288) | private static void appendEscapedCodepoint(StringBuilder out, char c) {
method consumeWhitespace (line 296) | public boolean consumeWhitespace() {
method consumeElementSelector (line 310) | public String consumeElementSelector() {
method consumeCssIdentifier (line 326) | public String consumeCssIdentifier() {
method consumeCssEscapeSequenceInto (line 368) | private void consumeCssEscapeSequenceInto(StringBuilder out) {
method isNonAscii (line 409) | private static boolean isNonAscii(char c) {
method isIdentStart (line 414) | private static boolean isIdentStart(char c) {
method isIdent (line 419) | private static boolean isIdent(char c) {
method isNewline (line 425) | private static boolean isNewline(char c) {
method isValidCodePoint (line 430) | private static boolean isValidCodePoint(int codePoint) {
method consumeEscapedCssIdentifier (line 436) | private String consumeEscapedCssIdentifier(char... matches) {
method matchesCssIdentifier (line 454) | private boolean matchesCssIdentifier(char... matches) {
method remainder (line 462) | public String remainder() {
method toString (line 466) | @Override
method close (line 471) | @Override
FILE: src/main/java/org/jsoup/parser/Tokeniser.java
class Tokeniser (line 14) | final class Tokeniser {
method Tokeniser (line 55) | Tokeniser(TreeBuilder treeBuilder) {
method read (line 64) | Token read() {
method emit (line 79) | void emit(Token token) {
method emit (line 99) | void emit(final String str) {
method emit (line 108) | void emit(char c) {
method emit (line 114) | void emit(int[] codepoints) {
method transition (line 118) | void transition(TokeniserState newState) {
method advanceTransition (line 126) | void advanceTransition(TokeniserState newState) {
method consumeCharacterReference (line 135) | int @Nullable [] consumeCharacterReference(@Nullable Character additio...
method createTagPending (line 221) | Token.Tag createTagPending(boolean start) {
method createXmlDeclPending (line 226) | Token.XmlDecl createXmlDeclPending(boolean isDeclaration) {
method emitTagPending (line 233) | void emitTagPending() {
method createCommentPending (line 238) | void createCommentPending() {
method emitCommentPending (line 242) | void emitCommentPending() {
method createBogusCommentPending (line 246) | void createBogusCommentPending() {
method createDoctypePending (line 251) | void createDoctypePending() {
method emitDoctypePending (line 255) | void emitDoctypePending() {
method createTempBuffer (line 259) | void createTempBuffer() {
method isAppropriateEndTagToken (line 263) | boolean isAppropriateEndTagToken() {
method appropriateEndTagName (line 267) | @Nullable String appropriateEndTagName() {
method appropriateEndTagSeq (line 272) | String appropriateEndTagSeq() {
method error (line 278) | void error(TokeniserState state) {
method eofError (line 283) | void eofError(TokeniserState state) {
method characterReferenceError (line 288) | private void characterReferenceError(String message, Object... args) {
method error (line 293) | void error(String errorMsg) {
method error (line 298) | void error(String errorMsg, Object... args) {
method unescapeEntities (line 308) | String unescapeEntities(boolean inAttribute) {
FILE: src/main/java/org/jsoup/parser/TokeniserState.java
type TokeniserState (line 10) | enum TokeniserState {
method read (line 13) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 37) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 43) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 67) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 72) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 77) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 82) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 101) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 131) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 152) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 187) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 204) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 217) | @Override void read(Tokeniser t, CharacterReader r) {
method anythingElse (line 256) | private void anythingElse(Tokeniser t, CharacterReader r) {
method read (line 264) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 275) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 280) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 285) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 308) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 313) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 318) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 328) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 338) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 365) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 393) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 424) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 441) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 454) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 459) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 464) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 491) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 518) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 548) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 559) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 565) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 612) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 658) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 703) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 752) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 787) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 822) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 873) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 907) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 927) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 940) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 965) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 978) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1006) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1034) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1056) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1079) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1109) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1137) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1164) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1199) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1234) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1262) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1302) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1339) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1367) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1395) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1433) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1470) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1510) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1547) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1575) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1603) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1630) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1648) | @Override void read(Tokeniser t, CharacterReader r) {
method read (line 1659) | abstract void read(Tokeniser t, CharacterReader r);
method handleDataEndTag (line 1674) | private static void handleDataEndTag(Tokeniser t, CharacterReader r, T...
method readRawData (line 1715) | private static void readRawData(Tokeniser t, CharacterReader r, Tokeni...
method readCharRef (line 1735) | private static void readCharRef(Tokeniser t, TokeniserState advance) {
method readEndTag (line 1744) | private static void readEndTag(Tokeniser t, CharacterReader r, Tokenis...
method handleDataDoubleEscapeTag (line 1754) | private static void handleDataDoubleEscapeTag(Tokeniser t, CharacterRe...
FILE: src/main/java/org/jsoup/parser/TreeBuilder.java
class TreeBuilder (line 22) | abstract class TreeBuilder {
method defaultSettings (line 36) | abstract ParseSettings defaultSettings();
method initialiseParse (line 40) | void initialiseParse(Reader input, String baseUri, Parser parser) {
method completeParse (line 62) | void completeParse() {
method parse (line 71) | Document parse(Reader input, String baseUri, Parser parser) {
method parseFragment (line 77) | List<Node> parseFragment(Reader inputFragment, @Nullable Element conte...
method initialiseParseFragment (line 84) | void initialiseParseFragment(@Nullable Element context) {
method completeParseFragment (line 88) | abstract List<Node> completeParseFragment();
method nodeListener (line 91) | void nodeListener(NodeVisitor nodeListener) {
method newInstance (line 99) | abstract TreeBuilder newInstance();
method runParser (line 101) | void runParser() {
method stepParser (line 106) | boolean stepParser() {
method process (line 126) | abstract boolean process(Token token);
method processStartTag (line 128) | boolean processStartTag(String name) {
method processStartTag (line 137) | boolean processStartTag(String name, Attributes attrs) {
method processEndTag (line 147) | boolean processEndTag(String name) {
method pop (line 158) | Element pop() {
method push (line 169) | final void push(Element element) {
method enforceStackDepthLimit (line 178) | final void enforceStackDepthLimit() {
method onStackPrunedForDepth (line 190) | void onStackPrunedForDepth(Element element) {
method defaultMaxDepth (line 197) | int defaultMaxDepth() {
method currentElement (line 206) | Element currentElement() {
method currentElementIs (line 216) | boolean currentElementIs(String normalName) {
method currentElementIs (line 230) | boolean currentElementIs(String normalName, String namespace) {
method error (line 242) | void error(String msg) {
method error (line 251) | void error(String msg, Object... args) {
method tagFor (line 257) | Tag tagFor(String tagName, String normalName, String namespace, ParseS...
method tagFor (line 261) | Tag tagFor(Token.Tag token) {
method defaultNamespace (line 269) | String defaultNamespace() {
method defaultTagSet (line 273) | TagSet defaultTagSet() {
method onNodeInserted (line 281) | void onNodeInserted(Node node) {
method onNodeClosed (line 292) | void onNodeClosed(Node node) {
method trackNodePosition (line 299) | void trackNodePosition(Node node, boolean isStart) {
FILE: src/main/java/org/jsoup/parser/XmlTreeBuilder.java
class XmlTreeBuilder (line 37) | public class XmlTreeBuilder extends TreeBuilder {
method defaultSettings (line 42) | @Override ParseSettings defaultSettings() {
method initialiseParse (line 46) | @Override
method initialiseParseFragment (line 61) | @Override
method parse (line 83) | Document parse(Reader input, String baseUri) {
method parse (line 87) | Document parse(String input, String baseUri) {
method completeParseFragment (line 91) | @Override List<Node> completeParseFragment() {
method newInstance (line 95) | @Override
method defaultNamespace (line 100) | @Override public String defaultNamespace() {
method defaultTagSet (line 104) | @Override
method defaultMaxDepth (line 109) | @Override
method process (line 114) | @Override
method insertElementFor (line 146) | void insertElementFor(Token.StartTag startTag) {
method processNamespaces (line 179) | private static void processNamespaces(Attributes attributes, HashMap<S...
method applyNamespacesToAttributes (line 193) | private static void applyNamespacesToAttributes(Attributes attributes,...
method resolveNamespace (line 208) | private static String resolveNamespace(String tagName, HashMap<String,...
method insertLeafNode (line 219) | void insertLeafNode(LeafNode node) {
method insertCommentFor (line 224) | void insertCommentFor(Token.Comment commentToken) {
method insertCharacterFor (line 229) | void insertCharacterFor(Token.Character token) {
method insertDoctypeFor (line 238) | void insertDoctypeFor(Token.Doctype token) {
method insertXmlDeclarationFor (line 244) | void insertXmlDeclarationFor(Token.XmlDecl token) {
method pop (line 250) | @Override
method popStackToClose (line 262) | protected void popStackToClose(Token.EndTag endTag) {
FILE: src/main/java/org/jsoup/safety/Cleaner.java
class Cleaner (line 39) | public class Cleaner {
method Cleaner (line 46) | public Cleaner(Safelist safelist) {
method clean (line 58) | public Document clean(Document dirtyDocument) {
method isValid (line 90) | public boolean isValid(Document dirtyDocument) {
method isValidBodyHtml (line 120) | public boolean isValidBodyHtml(String bodyHtml) {
class CleaningVisitor (line 134) | private final class CleaningVisitor implements NodeVisitor {
method CleaningVisitor (line 139) | private CleaningVisitor(Element root, Element destination) {
method head (line 144) | @Override public void head(Node source, int depth) {
method tail (line 171) | @Override public void tail(Node source, int depth) {
method copySafeNodes (line 178) | private int copySafeNodes(Element source, Element dest) {
method createSafeElement (line 184) | private ElementMeta createSafeElement(Element sourceEl) {
class ElementMeta (line 227) | private static class ElementMeta {
method ElementMeta (line 231) | ElementMeta(Element el, int numAttribsDiscarded) {
FILE: src/main/java/org/jsoup/safety/Safelist.java
class Safelist (line 72) | public class Safelist {
method none (line 102) | public static Safelist none() {
method simpleText (line 112) | public static Safelist simpleText() {
method basic (line 133) | public static Safelist basic() {
method basicWithImages (line 159) | public static Safelist basicWithImages() {
method relaxed (line 177) | public static Safelist relaxed() {
method Safelist (line 216) | public Safelist() {
method Safelist (line 228) | public Safelist(Safelist copy) {
method addTags (line 253) | public Safelist addTags(String... tags) {
method removeTags (line 271) | public Safelist removeTags(String... tags) {
method addAttributes (line 302) | public Safelist addAttributes(String tag, String... attributes) {
method removeAttributes (line 334) | public Safelist removeAttributes(String tag, String... attributes) {
method addEnforcedAttribute (line 378) | public Safelist addEnforcedAttribute(String tag, String attribute, Str...
method removeEnforcedAttribute (line 400) | public Safelist removeEnforcedAttribute(String tag, String attribute) {
method preserveRelativeLinks (line 425) | public Safelist preserveRelativeLinks(boolean preserve) {
method preserveRelativeLinks (line 434) | public boolean preserveRelativeLinks() {
method addProtocols (line 454) | public Safelist addProtocols(String tag, String attribute, String... p...
method removeProtocols (line 484) | public Safelist removeProtocols(String tag, String attribute, String.....
method isSafeTag (line 517) | public boolean isSafeTag(String tag) {
method isSafeAttribute (line 529) | public boolean isSafeAttribute(String tagName, Element el, Attribute a...
method getProtocolValue (line 553) | private String getProtocolValue(Element el, Attribute attr) {
method isSafeProtocol (line 560) | private boolean isSafeProtocol(String value, Set<Protocol> protocols) {
method shouldAbsUrl (line 586) | boolean shouldAbsUrl(String tagName, String attrKey) {
method shouldAbsUrl (line 591) | private boolean shouldAbsUrl(TagName tag, AttributeKey key) {
method isValidAnchor (line 604) | private static boolean isValidAnchor(String value) {
method getEnforcedAttributes (line 613) | public Attributes getEnforcedAttributes(String tagName) {
class TagName (line 627) | static class TagName extends TypedValue {
method TagName (line 628) | TagName(String value) {
method valueOf (line 632) | static TagName valueOf(String value) {
class AttributeKey (line 637) | static class AttributeKey extends TypedValue {
method AttributeKey (line 638) | AttributeKey(String value) {
method valueOf (line 642) | static AttributeKey valueOf(String value) {
class AttributeValue (line 647) | static class AttributeValue extends TypedValue {
method AttributeValue (line 648) | AttributeValue(String value) {
method valueOf (line 652) | static AttributeValue valueOf(String value) {
class Protocol (line 657) | static class Protocol extends TypedValue {
method Protocol (line 658) | Protocol(String value) {
method valueOf (line 662) | static Protocol valueOf(String value) {
class TypedValue (line 667) | abstract static class TypedValue {
method TypedValue (line 670) | TypedValue(String value) {
method hashCode (line 675) | @Override
method equals (line 680) | @Override
method toString (line 688) | @Override
FILE: src/main/java/org/jsoup/select/Collector.java
class Collector (line 20) | public class Collector {
method Collector (line 22) | private Collector() {}
method collect (line 30) | public static Elements collect(Evaluator eval, Element root) {
method stream (line 47) | public static Stream<Element> stream(Evaluator evaluator, Element root) {
method streamNodes (line 63) | public static <T extends Node> Stream<T> streamNodes(Evaluator evaluat...
method findFirst (line 75) | public static @Nullable Element findFirst(Evaluator eval, Element root) {
method findFirstNode (line 91) | public static <T extends Node> @Nullable T findFirstNode(Evaluator eva...
method collectNodes (line 107) | public static <T extends Node> Nodes<T> collectNodes(Evaluator evaluat...
FILE: src/main/java/org/jsoup/select/CombiningEvaluator.java
class CombiningEvaluator (line 18) | public abstract class CombiningEvaluator extends Evaluator {
method CombiningEvaluator (line 25) | CombiningEvaluator() {
method CombiningEvaluator (line 31) | CombiningEvaluator(Collection<Evaluator> evaluators) {
method add (line 37) | public void add(Evaluator e) {
method reset (line 42) | @Override protected void reset() {
method cost (line 49) | @Override protected int cost() {
method wantsNodes (line 53) | @Override
method updateEvaluators (line 58) | void updateEvaluators() {
class And (line 80) | public static final class And extends CombiningEvaluator {
method And (line 81) | public And(Collection<Evaluator> evaluators) {
method And (line 85) | And(Evaluator... evaluators) {
method matches (line 89) | @Override
method matches (line 99) | @Override
method toString (line 109) | @Override
class Or (line 115) | public static final class Or extends CombiningEvaluator {
method Or (line 120) | public Or(Collection<Evaluator> evaluators) {
method Or (line 129) | Or(Evaluator... evaluators) { this(Arrays.asList(evaluators)); }
method Or (line 131) | Or() {
method matches (line 135) | @Override
method matches (line 145) | @Override
method toString (line 155) | @Override
FILE: src/main/java/org/jsoup/select/Elements.java
class Elements (line 30) | public class Elements extends Nodes<Element> {
method Elements (line 31) | public Elements() {
method Elements (line 34) | public Elements(int initialCapacity) {
method Elements (line 38) | public Elements(Collection<Element> elements) {
method Elements (line 42) | public Elements(List<Element> elements) {
method Elements (line 46) | public Elements(Element... elements) {
method clone (line 54) | @Override
method asList (line 72) | @Override
method attr (line 85) | public String attr(String attributeKey) {
method hasAttr (line 98) | public boolean hasAttr(String attributeKey) {
method eachAttr (line 113) | public List<String> eachAttr(String attributeKey) {
method attr (line 128) | public Elements attr(String attributeKey, String attributeValue) {
method removeAttr (line 140) | public Elements removeAttr(String attributeKey) {
method addClass (line 152) | public Elements addClass(String className) {
method removeClass (line 164) | public Elements removeClass(String className) {
method toggleClass (line 176) | public Elements toggleClass(String className) {
method hasClass (line 188) | public boolean hasClass(String className) {
method val (line 201) | public String val() {
method val (line 214) | public Elements val(String value) {
method text (line 229) | public String text() {
method hasText (line 240) | public boolean hasText() {
method eachText (line 256) | public List<String> eachText() {
method html (line 271) | public String html() {
method tagName (line 285) | public Elements tagName(String tagName) {
method html (line 298) | public Elements html(String html) {
method prepend (line 311) | public Elements prepend(String html) {
method append (line 324) | public Elements append(String html) {
method before (line 338) | @Override
method after (line 351) | @Override
method wrap (line 367) | @Override
method unwrap (line 387) | public Elements unwrap() {
method empty (line 405) | public Elements empty() {
method remove (line 426) | @Override
method select (line 439) | public Elements select(String query) {
method selectFirst (line 453) | public @Nullable Element selectFirst(String cssQuery) {
method expectFirst (line 465) | public Element expectFirst(String cssQuery) {
method not (line 482) | public Elements not(String query) {
method eq (line 494) | public Elements eq(int index) {
method is (line 503) | public boolean is(String query) {
method next (line 516) | public Elements next() {
method next (line 525) | public Elements next(String query) {
method nextAll (line 533) | public Elements nextAll() {
method nextAll (line 542) | public Elements nextAll(String query) {
method prev (line 550) | public Elements prev() {
method prev (line 559) | public Elements prev(String query) {
method prevAll (line 567) | public Elements prevAll() {
method prevAll (line 576) | public Elements prevAll(String query) {
method siblings (line 580) | private Elements siblings(@Nullable String query, boolean next, boolea...
method parents (line 598) | public Elements parents() {
method first (line 611) | @Override
method last (line 620) | @Override
method traverse (line 630) | public Elements traverse(NodeVisitor nodeVisitor) {
method filter (line 640) | public Elements filter(NodeFilter nodeFilter) {
method forms (line 650) | public List<FormElement> forms() {
method comments (line 662) | public List<Comment> comments() {
method textNodes (line 670) | public List<TextNode> textNodes() {
method dataNodes (line 679) | public List<DataNode> dataNodes() {
method childNodesOfType (line 683) | private <T extends Node> List<T> childNodesOfType(Class<T> tClass) {
method set (line 705) | @Override
method remove (line 718) | @Override
method deselect (line 732) | @Override
FILE: src/main/java/org/jsoup/select/Evaluator.java
class Evaluator (line 31) | public abstract class Evaluator {
method Evaluator (line 32) | protected Evaluator() {
method asPredicate (line 41) | public Predicate<Element> asPredicate(Element root) {
method asNodePredicate (line 45) | Predicate<Node> asNodePredicate(Element root) {
method matches (line 57) | public abstract boolean matches(Element root, Element element);
method matches (line 59) | final boolean matches(Element root, Node node) {
method matches (line 68) | boolean matches(Element root, LeafNode leafNode) {
method wantsNodes (line 72) | boolean wantsNodes() {
method reset (line 79) | protected void reset() {
method cost (line 86) | protected int cost() {
class Tag (line 93) | public static final class Tag extends Evaluator {
method Tag (line 96) | public Tag(String tagName) {
method matches (line 100) | @Override
method cost (line 105) | @Override protected int cost() {
method toString (line 109) | @Override
class TagStartsWith (line 118) | public static final class TagStartsWith extends Evaluator {
method TagStartsWith (line 121) | public TagStartsWith(String tagName) {
method matches (line 125) | @Override
method toString (line 130) | @Override
class TagEndsWith (line 140) | public static final class TagEndsWith extends Evaluator {
method TagEndsWith (line 143) | public TagEndsWith(String tagName) {
method matches (line 147) | @Override
method toString (line 152) | @Override
class Id (line 161) | public static final class Id extends Evaluator {
method Id (line 164) | public Id(String id) {
method matches (line 168) | @Override
method cost (line 173) | @Override protected int cost() {
method toString (line 176) | @Override
class Class (line 185) | public static final class Class extends Evaluator {
method Class (line 188) | public Class(String className) {
method matches (line 192) | @Override
method cost (line 197) | @Override protected int cost() {
method toString (line 201) | @Override
class Attribute (line 211) | public static final class Attribute extends Evaluator {
method Attribute (line 214) | public Attribute(String key) {
method matches (line 218) | @Override
method cost (line 223) | @Override protected int cost() {
method toString (line 227) | @Override
class AttributeStarting (line 236) | public static final class AttributeStarting extends Evaluator {
method AttributeStarting (line 239) | public AttributeStarting(String keyPrefix) {
method matches (line 244) | @Override
method cost (line 254) | @Override protected int cost() {
method toString (line 258) | @Override
class AttributeWithValue (line 268) | public static final class AttributeWithValue extends AttributeKeyPair {
method AttributeWithValue (line 269) | public AttributeWithValue(String key, String value) {
method matches (line 273) | @Override
method cost (line 278) | @Override protected int cost() {
method toString (line 282) | @Override
class AttributeWithValueNot (line 292) | public static final class AttributeWithValueNot extends AttributeKeyPa...
method AttributeWithValueNot (line 293) | public AttributeWithValueNot(String key, String value) {
method matches (line 297) | @Override
method cost (line 302) | @Override protected int cost() {
method toString (line 306) | @Override
class AttributeWithValueStarting (line 316) | public static final class AttributeWithValueStarting extends Attribute...
method AttributeWithValueStarting (line 317) | public AttributeWithValueStarting(String key, String value) {
method matches (line 321) | @Override
method cost (line 326) | @Override protected int cost() {
method toString (line 330) | @Override
class AttributeWithValueEnding (line 339) | public static final class AttributeWithValueEnding extends AttributeKe...
method AttributeWithValueEnding (line 340) | public AttributeWithValueEnding(String key, String value) {
method matches (line 344) | @Override
method cost (line 349) | @Override protected int cost() {
method toString (line 353) | @Override
class AttributeWithValueContaining (line 362) | public static final class AttributeWithValueContaining extends Attribu...
method AttributeWithValueContaining (line 363) | public AttributeWithValueContaining(String key, String value) {
method matches (line 367) | @Override
method cost (line 372) | @Override protected int cost() {
method toString (line 376) | @Override
class AttributeWithValueMatching (line 386) | public static final class AttributeWithValueMatching extends Evaluator {
method AttributeWithValueMatching (line 390) | public AttributeWithValueMatching(String key, Regex pattern) {
method AttributeWithValueMatching (line 395) | public AttributeWithValueMatching(String key, Pattern pattern) {
method matches (line 399) | @Override
method cost (line 404) | @Override protected int cost() {
method toString (line 408) | @Override
class AttributeKeyPair (line 418) | public abstract static class AttributeKeyPair extends Evaluator {
method AttributeKeyPair (line 422) | public AttributeKeyPair(String key, String value) {
method AttributeKeyPair (line 441) | @Deprecated
class AllElements (line 452) | public static final class AllElements extends Evaluator {
method matches (line 454) | @Override
method cost (line 459) | @Override protected int cost() {
method toString (line 463) | @Override
class IndexLessThan (line 472) | public static final class IndexLessThan extends IndexEvaluator {
method IndexLessThan (line 473) | public IndexLessThan(int index) {
method matches (line 477) | @Override
method toString (line 482) | @Override
class IndexGreaterThan (line 492) | public static final class IndexGreaterThan extends IndexEvaluator {
method IndexGreaterThan (line 493) | public IndexGreaterThan(int index) {
method matches (line 497) | @Override
method toString (line 502) | @Override
class IndexEquals (line 512) | public static final class IndexEquals extends IndexEvaluator {
method IndexEquals (line 513) | public IndexEquals(int index) {
method matches (line 517) | @Override
method toString (line 522) | @Override
class IsLastChild (line 532) | public static final class IsLastChild extends Evaluator {
method matches (line 533) | @Override
method toString (line 539) | @Override
class IsFirstOfType (line 545) | public static final class IsFirstOfType extends IsNthOfType {
method IsFirstOfType (line 546) | public IsFirstOfType() {
method toString (line 549) | @Override
class IsLastOfType (line 555) | public static final class IsLastOfType extends IsNthLastOfType {
method IsLastOfType (line 556) | public IsLastOfType() {
method toString (line 559) | @Override
class CssNthEvaluator (line 566) | public static abstract class CssNthEvaluator extends Evaluator {
method CssNthEvaluator (line 572) | public CssNthEvaluator(int step, int offset) {
method CssNthEvaluator (line 577) | public CssNthEvaluator(int offset) {
method matches (line 581) | @Override
method toString (line 592) | @Override
method getPseudoClass (line 601) | protected abstract String getPseudoClass();
method calculatePosition (line 603) | protected abstract int calculatePosition(Element root, Element eleme...
class IsNthChild (line 612) | public static final class IsNthChild extends CssNthEvaluator {
method IsNthChild (line 613) | public IsNthChild(int step, int offset) {
method calculatePosition (line 617) | @Override
method getPseudoClass (line 622) | @Override
class IsNthLastChild (line 633) | public static final class IsNthLastChild extends CssNthEvaluator {
method IsNthLastChild (line 634) | public IsNthLastChild(int step, int offset) {
method calculatePosition (line 638) | @Override
method getPseudoClass (line 644) | @Override
class IsNthOfType (line 654) | public static class IsNthOfType extends CssNthEvaluator {
method IsNthOfType (line 655) | public IsNthOfType(int step, int offset) {
method calculatePosition (line 659) | @Override protected int calculatePosition(Element root, Element elem...
method getPseudoClass (line 674) | @Override
class IsNthLastOfType (line 680) | public static class IsNthLastOfType extends CssNthEvaluator {
method IsNthLastOfType (line 681) | public IsNthLastOfType(int step, int offset) {
method calculatePosition (line 685) | @Override
method getPseudoClass (line 701) | @Override
class IsFirstChild (line 710) | public static final class IsFirstChild extends Evaluator {
method matches (line 711) | @Override
method toString (line 717) | @Override
class IsRoot (line 728) | public static final class IsRoot extends Evaluator {
method matches (line 729) | @Override
method cost (line 735) | @Override protected int cost() {
method toString (line 739) | @Override
class IsOnlyChild (line 745) | public static final class IsOnlyChild extends Evaluator {
method matches (line 746) | @Override
method toString (line 751) | @Override
class IsOnlyOfType (line 757) | public static final class IsOnlyOfType extends Evaluator {
method matches (line 758) | @Override
method toString (line 774) | @Override
class IsEmpty (line 780) | public static final class IsEmpty extends Evaluator {
method matches (line 781) | @Override
method toString (line 793) | @Override
class IndexEvaluator (line 804) | public abstract static class IndexEvaluator extends Evaluator {
method IndexEvaluator (line 807) | public IndexEvaluator(int index) {
class ContainsText (line 815) | public static final class ContainsText extends Evaluator {
method ContainsText (line 818) | public ContainsText(String searchText) {
method matches (line 822) | @Override
method cost (line 827) | @Override protected int cost() {
method toString (line 831) | @Override
class ContainsWholeText (line 842) | public static final class ContainsWholeText extends Evaluator {
method ContainsWholeText (line 845) | public ContainsWholeText(String searchText) {
method matches (line 849) | @Override
method cost (line 854) | @Override protected int cost() {
method toString (line 858) | @Override
class ContainsWholeOwnText (line 869) | public static final class ContainsWholeOwnText extends Evaluator {
method ContainsWholeOwnText (line 872) | public ContainsWholeOwnText(String searchText) {
method matches (line 876) | @Override
method toString (line 881) | @Override
class ContainsData (line 890) | public static final class ContainsData extends Evaluator {
method ContainsData (line 893) | public ContainsData(String searchText) {
method matches (line 897) | @Override
method toString (line 902) | @Override
class ContainsOwnText (line 911) | public static final class ContainsOwnText extends Evaluator {
method ContainsOwnText (line 914) | public ContainsOwnText(String searchText) {
method matches (line 918) | @Override
method toString (line 923) | @Override
class Matches (line 932) | public static final class Matches extends Evaluator {
method Matches (line 935) | public Matches(Regex pattern) {
method Matches (line 939) | public Matches(Pattern pattern) {
method matches (line 943) | @Override
method cost (line 948) | @Override protected int cost() {
method toString (line 952) | @Override
class MatchesOwn (line 961) | public static final class MatchesOwn extends Evaluator {
method MatchesOwn (line 964) | public MatchesOwn(Regex pattern) {
method MatchesOwn (line 968) | public MatchesOwn(Pattern pattern) {
method matches (line 972) | @Override
method cost (line 977) | @Override protected int cost() {
method toString (line 981) | @Override
class MatchesWholeText (line 991) | public static final class MatchesWholeText extends Evaluator {
method MatchesWholeText (line 994) | public MatchesWholeText(Regex pattern) {
method MatchesWholeText (line 998) | public MatchesWholeText(Pattern pattern) {
method matches (line 1002) | @Override
method cost (line 1007) | @Override protected int cost() {
method toString (line 1011) | @Override
class MatchesWholeOwnText (line 1021) | public static final class MatchesWholeOwnText extends Evaluator {
method MatchesWholeOwnText (line 1024) | public MatchesWholeOwnText(Regex pattern) {
method MatchesWholeOwnText (line 1028) | public MatchesWholeOwnText(Pattern pattern) {
method matches (line 1032) | @Override
method cost (line 1038) | @Override protected int cost() {
method toString (line 1042) | @Override
class MatchText (line 1051) | @Deprecated
method MatchText (line 1055) | public MatchText() {
method matches (line 1063) | @Override
method cost (line 1078) | @Override protected int cost() {
method toString (line 1082) | @Override
FILE: src/main/java/org/jsoup/select/NodeEvaluator.java
class NodeEvaluator (line 12) | abstract class NodeEvaluator extends Evaluator {
method matches (line 14) | @Override
method matches (line 19) | @Override boolean matches(Element root, LeafNode leaf) {
method evaluateMatch (line 23) | abstract boolean evaluateMatch(Node node);
method wantsNodes (line 25) | @Override boolean wantsNodes() {
class InstanceType (line 29) | static class InstanceType extends NodeEvaluator {
method InstanceType (line 33) | InstanceType(java.lang.Class<? extends Node> type, String selector) {
method evaluateMatch (line 39) | @Override
method cost (line 44) | @Override
method toString (line 49) | @Override
class ContainsValue (line 55) | static class ContainsValue extends NodeEvaluator {
method ContainsValue (line 58) | public ContainsValue(String searchText) {
method evaluateMatch (line 62) | @Override
method cost (line 67) | @Override
method toString (line 72) | @Override
class BlankValue (line 81) | static class BlankValue extends NodeEvaluator {
method evaluateMatch (line 83) | @Override
method cost (line 88) | @Override
method toString (line 93) | @Override
class MatchesValue (line 99) | static class MatchesValue extends NodeEvaluator {
method MatchesValue (line 102) | protected MatchesValue(Regex pattern) {
method evaluateMatch (line 106) | @Override
method cost (line 111) | @Override
method toString (line 116) | @Override
FILE: src/main/java/org/jsoup/select/NodeFilter.java
type NodeFilter (line 25) | public interface NodeFilter {
type FilterResult (line 29) | enum FilterResult {
method head (line 48) | FilterResult head(Node node, int depth);
method tail (line 57) | default FilterResult tail(Node node, int depth) {
method traverse (line 66) | default void traverse(Node root) {
FILE: src/main/java/org/jsoup/select/NodeTraversor.java
class NodeTraversor (line 18) | public class NodeTraversor {
method traverse (line 30) | public static void traverse(NodeVisitor visitor, Node root) {
method traverse (line 100) | public static void traverse(NodeVisitor visitor, Elements elements) {
method filter (line 115) | public static FilterResult filter(NodeFilter filter, Node root) {
method filter (line 168) | public static void filter(NodeFilter filter, Elements elements) {
FILE: src/main/java/org/jsoup/select/NodeVisitor.java
type NodeVisitor (line 26) | @FunctionalInterface
method head (line 50) | void head(Node node, int depth);
method tail (line 63) | default void tail(Node node, int depth) {
method traverse (line 72) | default void traverse(Node root) {
FILE: src/main/java/org/jsoup/select/Nodes.java
class Nodes (line 29) | public class Nodes<T extends Node> extends ArrayList<T> {
method Nodes (line 30) | public Nodes() {
method Nodes (line 33) | public Nodes(int initialCapacity) {
method Nodes (line 37) | public Nodes(Collection<T> nodes) {
method Nodes (line 41) | public Nodes(List<T> nodes) {
method Nodes (line 45) | @SafeVarargs
method clone (line 54) | @Override
method asList (line 71) | public ArrayList<T> asList() {
method remove (line 91) | public Nodes<T> remove() {
method outerHtml (line 105) | public String outerHtml() {
method toString (line 118) | @Override
method before (line 130) | public Nodes<T> before(String html) {
method after (line 144) | public Nodes<T> after(String html) {
method wrap (line 160) | public Nodes<T> wrap(String html) {
method first (line 173) | public @Nullable T first() {
method last (line 181) | public @Nullable T last() {
method set (line 194) | @Override
method remove (line 209) | @Override
method remove (line 223) | @Override
method deselect (line 241) | public T deselect(int index) {
method deselect (line 252) | public boolean deselect(Object o) {
method clear (line 261) | @Override
method deselectAll (line 272) | public void deselectAll() {
method removeAll (line 283) | @Override
method retainAll (line 301) | @Override
method removeIf (line 320) | @Override
method replaceAll (line 338) | @Override
FILE: src/main/java/org/jsoup/select/QueryParser.java
class QueryParser (line 25) | public class QueryParser implements AutoCloseable {
method QueryParser (line 38) | private QueryParser(String query) {
method parse (line 54) | public static Evaluator parse(String query) {
method parse (line 77) | Evaluator parse() {
method parseSelectorGroup (line 85) | Evaluator parseSelectorGroup() {
method parseSelector (line 95) | Evaluator parseSelector() {
method parseSimpleSequence (line 126) | Evaluator parseSimpleSequence() {
method combinator (line 151) | static Evaluator combinator(Evaluator left, char combinator, Evaluator...
method parseSubclass (line 169) | @Nullable Evaluator parseSubclass() {
method or (line 180) | static Evaluator or(Evaluator left, Evaluator right) {
method and (line 189) | static Evaluator and(@Nullable Evaluator left, Evaluator right) {
method parsePseudoSelector (line 198) | private Evaluator parsePseudoSelector() {
method parseNodeSelector (line 265) | private Evaluator parseNodeSelector() {
method byId (line 304) | private Evaluator byId() {
method byClass (line 310) | private Evaluator byClass() {
method byTag (line 316) | private Evaluator byTag() {
method byAttribute (line 340) | private Evaluator byAttribute() {
method evaluatorForAttribute (line 346) | private Evaluator evaluatorForAttribute(TokenQueue cq) {
method cssNthChild (line 385) | private Evaluator cssNthChild(boolean last, boolean ofType) {
method consumeParens (line 416) | private String consumeParens() {
method consumeIndex (line 420) | private int consumeIndex() {
method has (line 427) | private Evaluator has() {
method is (line 432) | private Evaluator is() {
method parseNested (line 436) | private Evaluator parseNested(Function<Evaluator, Evaluator> func, Str...
method contains (line 444) | private Evaluator contains(boolean own) {
method containsWholeText (line 457) | private Evaluator containsWholeText(boolean own) {
method containsData (line 467) | private Evaluator containsData() {
method matches (line 474) | private Evaluator matches(boolean own) {
method matchesWholeText (line 489) | private Evaluator matchesWholeText(boolean own) {
method not (line 501) | private Evaluator not() {
method toString (line 508) | @Override
method close (line 513) | @Override
FILE: src/main/java/org/jsoup/select/Selector.java
class Selector (line 114) | public class Selector {
method Selector (line 116) | private Selector() {}
method select (line 126) | public static Elements select(String query, Element root) {
method select (line 138) | public static Elements select(Evaluator evaluator, Element root) {
method selectStream (line 153) | public static Stream<Element> selectStream(String query, Element root) {
method selectStream (line 166) | public static Stream<Element> selectStream(Evaluator evaluator, Elemen...
method select (line 180) | public static Elements select(String query, Iterable<Element> roots) {
method filterOut (line 197) | static Elements filterOut(Collection<Element> elements, Collection<Ele...
method selectFirst (line 220) | public static @Nullable Element selectFirst(String cssQuery, Element r...
method selectFirst (line 233) | public static @Nullable Element selectFirst(String cssQuery, Iterable<...
method escapeCssIdentifier (line 253) | public static String escapeCssIdentifier(String in) {
method unescapeCssIdentifier (line 268) | public static String unescapeCssIdentifier(String in) {
method evaluatorOf (line 284) | public static Evaluator evaluatorOf(String css) {
class SelectorParseException (line 288) | public static class SelectorParseException extends IllegalStateExcepti...
method SelectorParseException (line 289) | public SelectorParseException(String msg) {
method SelectorParseException (line 293) | public SelectorParseException(String msg, Object... msgArgs) {
method SelectorParseException (line 297) | public SelectorParseException(Throwable cause, String msg, Object......
FILE: src/main/java/org/jsoup/select/StructuralEvaluator.java
class StructuralEvaluator (line 18) | abstract class StructuralEvaluator extends Evaluator {
method StructuralEvaluator (line 22) | public StructuralEvaluator(Evaluator evaluator) {
method wantsNodes (line 27) | @Override
method memoMatches (line 36) | boolean memoMatches(final Element root, final Node node) {
method reset (line 42) | @Override protected void reset() {
method matches (line 48) | @Override
method matches (line 53) | @Override
method evaluateMatch (line 58) | abstract boolean evaluateMatch(Element root, Node node);
class Root (line 60) | static class Root extends Evaluator {
method matches (line 61) | @Override
method cost (line 66) | @Override protected int cost() {
method toString (line 70) | @Override public String toString() {
class Has (line 75) | static class Has extends StructuralEvaluator {
method Has (line 82) | public Has(Evaluator evaluator) {
method matches (line 87) | @Override public boolean matches(Element root, Element element) {
method evaluateMatch (line 112) | @Override
method evalWantsSiblings (line 118) | private static boolean evalWantsSiblings(Evaluator eval) {
method cost (line 129) | @Override protected int cost() {
method toString (line 133) | @Override
class Is (line 140) | static class Is extends StructuralEvaluator {
method Is (line 141) | public Is(Evaluator evaluator) {
method evaluateMatch (line 145) | @Override
method cost (line 150) | @Override protected int cost() {
method toString (line 154) | @Override
class Not (line 160) | static class Not extends StructuralEvaluator {
method Not (line 161) | public Not(Evaluator evaluator) {
method evaluateMatch (line 165) | @Override
method cost (line 170) | @Override protected int cost() {
method toString (line 174) | @Override
class Ancestor (line 183) | static class Ancestor extends StructuralEvaluator {
method Ancestor (line 184) | public Ancestor(Evaluator evaluator) {
method evaluateMatch (line 188) | @Override
method cost (line 202) | @Override
method toString (line 207) | @Override
class ImmediateParentRun (line 217) | static class ImmediateParentRun extends StructuralEvaluator {
method ImmediateParentRun (line 221) | public ImmediateParentRun(Evaluator evaluator) {
method add (line 227) | void add(Evaluator evaluator) {
method evaluateMatch (line 233) | @Override boolean evaluateMatch(Element root, Node node) {
method cost (line 248) | @Override protected int cost() {
method reset (line 252) | @Override
method toString (line 260) | @Override
class PreviousSibling (line 266) | static class PreviousSibling extends StructuralEvaluator {
method PreviousSibling (line 267) | public PreviousSibling(Evaluator evaluator) {
method evaluateMatch (line 272) | @Override boolean evaluateMatch(Element root, Node node) {
method cost (line 283) | @Override protected int cost() {
method toString (line 287) | @Override
class ImmediatePreviousSibling (line 293) | static class ImmediatePreviousSibling extends StructuralEvaluator {
method ImmediatePreviousSibling (line 294) | public ImmediatePreviousSibling(Evaluator evaluator) {
method evaluateMatch (line 298) | @Override boolean evaluateMatch(Element root, Node node) {
method cost (line 305) | @Override protected int cost() {
method toString (line 309) | @Override
FILE: src/main/java11/org/jsoup/helper/HttpClientExecutor.java
class HttpClientExecutor (line 30) | class HttpClientExecutor extends RequestExecutor {
method HttpClientExecutor (line 39) | public HttpClientExecutor(HttpConnection.Request request, HttpConnecti...
method client (line 47) | HttpClient client() {
method execute (line 73) | @Override
method StatusMessage (line 124) | static String StatusMessage(int statusCode) {
method responseBody (line 130) | @Override
method safeClose (line 136) | @Override
method requestBody (line 149) | static HttpRequest.BodyPublisher requestBody(final HttpConnection.Requ...
class ProxyWrap (line 159) | static class ProxyWrap extends ProxySelector {
method select (line 163) | @Override
method connectFailed (line 176) | @Override
FILE: src/main/java11/org/jsoup/helper/RequestAuthHandler.java
class RequestAuthHandler (line 9) | class RequestAuthHandler implements AuthenticationHandler.AuthShim {
method RequestAuthHandler (line 10) | public RequestAuthHandler() {}
method enable (line 12) | @Override public void enable(RequestAuthenticator auth, Object connOrH...
method remove (line 27) | @Override public void remove() {
method get (line 31) | @Override public AuthenticationHandler get(AuthenticationHandler helpe...
FILE: src/test/java/org/jsoup/JsoupTest.java
class JsoupTest (line 13) | public class JsoupTest {
method parseWithPath (line 16) | @Test
FILE: src/test/java/org/jsoup/MultiLocaleExtension.java
class MultiLocaleExtension (line 15) | public class MultiLocaleExtension implements AfterEachCallback, Argument...
method afterEach (line 18) | @Override
method provideArguments (line 23) | @Override
FILE: src/test/java/org/jsoup/SerializationExceptionTest.java
class SerializationExceptionTest (line 7) | public class SerializationExceptionTest {
method constructors (line 8) | @Test void constructors() {
FILE: src/test/java/org/jsoup/TextUtil.java
class TextUtil (line 9) | public class TextUtil {
method stripNewlines (line 16) | public static String stripNewlines(String text) {
method normalizeSpaces (line 20) | public static String normalizeSpaces(String text) {
method stripCRs (line 28) | public static String stripCRs(String text) {
FILE: src/test/java/org/jsoup/helper/AuthenticationHandlerTest.java
class AuthenticationHandlerTest (line 3) | public class AuthenticationHandlerTest {
FILE: src/test/java/org/jsoup/helper/CookieUtilTest.java
class CookieUtilTest (line 7) | class CookieUtilTest {
method parseCookie (line 9) | @Test void parseCookie() {
FILE: src/test/java/org/jsoup/helper/DataUtilTest.java
class DataUtilTest (line 22) | public class DataUtilTest {
method testCharset (line 23) | @Test
method testQuotedCharset (line 33) | @Test
method stream (line 42) | private ControllableInputStream stream(String data) {
method stream (line 46) | private ControllableInputStream stream(String data, String charset) {
method discardsSpuriousByteOrderMark (line 50) | @Test
method discardsSpuriousByteOrderMarkWhenNoCharsetSet (line 57) | @Test
method shouldNotThrowExceptionOnEmptyCharset (line 65) | @Test
method shouldSelectFirstCharsetOnWeirdMultileCharsetsInMetaTags (line 71) | @Test
method shouldCorrectCharsetForDuplicateCharsetString (line 76) | @Test
method shouldReturnNullForIllegalCharsetNames (line 81) | @Test
method generatesMimeBoundaries (line 86) | @Test
method wrongMetaCharsetFallback (line 96) | @Test
method secondMetaElementWithContentTypeContainsCharsetParameter (line 112) | @Test
method firstMetaElementWithCharsetShouldBeUsedForDecoding (line 124) | @Test
method parseSequenceInputStream (line 136) | @Test
method supportsBOMinFiles (line 153) | @Test
method streamerSupportsBOMinFiles (line 177) | @Test
method supportsUTF8BOM (line 202) | @Test
method noExtraNULLBytes (line 209) | @Test
method supportsZippedUTF8BOM (line 217) | @Test
method streamerSupportsZippedUTF8BOM (line 225) | @Test
method supportsXmlCharsetDeclaration (line 233) | @Test
method loadsGzipFile (line 247) | @Test
method loadsGzipPath (line 255) | @Test
method loadsZGzipFile (line 263) | @Test
method loadsZGzipPath (line 272) | @Test
method handlesFakeGzipFile (line 281) | @Test
method handlesFakeGzipPath (line 289) | @Test
class VaryingReadInputStream (line 298) | static class VaryingReadInputStream extends InputStream {
method VaryingReadInputStream (line 302) | VaryingReadInputStream(InputStream in) {
method read (line 306) | public int read() throws IOException {
method read (line 310) | public int read(byte[] b) throws IOException {
method read (line 314) | public int read(byte[] b, int off, int len) throws IOException {
method handlesChunkedInputStream (line 319) | @Test
method handlesUnlimitedRead (line 330) | @Test
method controllableInputStreamAllowsNull (line 342) | @Test void controllableInputStreamAllowsNull() throws IOException {
method streamParserSurrogateAcrossBuffer (line 349) | @Test void streamParserSurrogateAcrossBuffer() throws IOException {
method parseSurrogateAcrossBuffer (line 358) | @Test void parseSurrogateAcrossBuffer() throws IOException {
method charsetSniffingCanReuseTruncatedPreParse (line 363) | @Test
class BufferedOnceAvailableStream (line 386) | static final class BufferedOnceAvailableStream extends InputStream {
method BufferedOnceAvailableStream (line 391) | BufferedOnceAvailableStream(byte[] data) {
method read (line 395) | @Override
method read (line 404) | @Override
method available (line 409) | @Override
method charsetSniffingIgnoresAdvisoryAvailableIOException (line 421) | @Test
FILE: src/test/java/org/jsoup/helper/HttpConnectionTest.java
class HttpConnectionTest (line 29) | public class HttpConnectionTest {
method canCreateEmptyConnection (line 32) | @Test public void canCreateEmptyConnection() {
method throwsExceptionOnResponseWithoutExecute (line 40) | @Test public void throwsExceptionOnResponseWithoutExecute() {
method throwsExceptionOnParseWithoutExecute (line 47) | @Test public void throwsExceptionOnParseWithoutExecute() {
method throwsExceptionOnBodyWithoutExecute (line 54) | @Test public void throwsExceptionOnBodyWithoutExecute() {
method throwsExceptionOnBodyAsBytesWithoutExecute (line 61) | @Test public void throwsExceptionOnBodyAsBytesWithoutExecute() {
method caseInsensitiveHeaders (line 68) | @MultiLocaleTest
method headers (line 98) | @Test public void headers() {
method sameHeadersCombineWithComma (line 110) | @Test public void sameHeadersCombineWithComma() {
method multipleHeaders (line 121) | @Test public void multipleHeaders() {
method responseHeadersPreserveInsertOrder (line 154) | @Test void responseHeadersPreserveInsertOrder() throws IOException {
method ignoresEmptySetCookies (line 172) | @Test public void ignoresEmptySetCookies() {
method connectWithUrl (line 181) | @Test public void connectWithUrl() throws MalformedURLException {
method throwsOnMalformedUrl (line 186) | @Test public void throwsOnMalformedUrl() {
method userAgent (line 190) | @Test public void userAgent() {
method timeout (line 197) | @Test public void timeout() {
method referrer (line 204) | @Test public void referrer() {
method method (line 210) | @Test public void method() {
method throwsOnOddData (line 217) | @Test public void throwsOnOddData() {
method data (line 224) | @Test public void data() {
method cookie (line 237) | @Test public void cookie() {
method inputStream (line 243) | @Test public void inputStream() {
method requestBody (line 255) | @Test public void requestBody() {
method encodeUrl (line 261) | @Test public void encodeUrl() throws MalformedURLException {
method encodeUrlSupplementary (line 267) | @Test public void encodeUrlSupplementary() throws MalformedURLException {
method encodedUrlDoesntDoubleEncode (line 273) | @Test void encodedUrlDoesntDoubleEncode() throws MalformedURLException {
method urlPathIsPreservedDoesntDoubleEncode (line 281) | @Test void urlPathIsPreservedDoesntDoubleEncode() throws MalformedURLE...
method connectToEncodedUrl (line 289) | @Test void connectToEncodedUrl() {
method encodedUrlPathIsPreserved (line 295) | @Test void encodedUrlPathIsPreserved() {
method urlPathPlusIsPreserved (line 302) | @Test void urlPathPlusIsPreserved() {
method noUrlThrowsValidationError (line 309) | @Test public void noUrlThrowsValidationError() throws IOException {
method handlesHeaderEncodingOnRequest (line 321) | @Test public void handlesHeaderEncodingOnRequest() {
method supportsInternationalDomainNames (line 326) | @Test public void supportsInternationalDomainNames() throws MalformedU...
method supportsIdnWithPort (line 338) | @Test void supportsIdnWithPort() throws MalformedURLException {
method validationErrorsOnExecute (line 350) | @Test public void validationErrorsOnExecute() throws IOException {
method testMalformedException (line 361) | @Test void testMalformedException() {
method setHeaderWithUnicodeValue (line 372) | @Test void setHeaderWithUnicodeValue() {
method setAuth (line 381) | @Test void setAuth() throws MalformedURLException {
method mojibake (line 417) | static String mojibake(String input) {
method fixesHeaderEncodingIfRequired (line 422) | @ParameterizedTest
FILE: src/test/java/org/jsoup/helper/RegexTest.java
class RegexTest (line 13) | public class RegexTest {
method setUp (line 17) | @BeforeEach
method tearDown (line 22) | @AfterEach
method testRegexDelegates (line 27) | @ParameterizedTest
method jdkSupportsBackreferenceMatches (line 40) | @Test
method re2jRejectsBackreferenceThrows (line 51) | @Test
method queryParserThrowsSelectorExceptionOnMalformedRegex (line 60) | @ParameterizedTest
FILE: src/test/java/org/jsoup/helper/ValidateTest.java
class ValidateTest (line 8) | @SuppressWarnings("deprecation") // keeps tests for ensureNotNull
method testNotNull (line 10) | @Test
method stacktraceFiltersOutValidateClass (line 22) | @Test
method nonnullParam (line 39) | @Test
method testWtf (line 50) | @Test
method testEnsureNotNull (line 62) | @Test
method testEnsureNotNullWithMessage (line 79) | @Test
method testEnsureNotNullWithFormattedMessage (line 96) | @Test
method expectNotNull (line 113) | @Test void expectNotNull() {
method testNotNullParam (line 130) | @Test
method testNotEmpty (line 147) | @Test
method testIsTrue (line 174) | @Test
method testIsFalse (line 190) | @Test
method testAssertFail (line 206) | @Test
method testNotEmptyParam (line 220) | @Test
method testNoNullElementsWithMessage (line 246) | @Test
method testNotEmptyWithMessage (line 263) | @Test
FILE: src/test/java/org/jsoup/helper/W3CDomTest.java
class W3CDomTest (line 39) | public class W3CDomTest {
method parseXml (line 41) | private static Document parseXml(String xml, boolean nameSpaceAware) {
method simpleConversion (line 61) | @Test
method namespacePreservation (line 88) | @Test
method handlesInvalidAttributeNames (line 149) | @Test
method htmlInputDocMaintainsHtmlAttributeNames (line 163) | @Test
method xmlInputDocMaintainsHtmlAttributeNames (line 175) | @Test
method handlesInvalidTagAsText (line 188) | @Test
method handlesHtmlElsWithLt (line 197) | @Test void handlesHtmlElsWithLt() {
method canConvertToCustomDocument (line 234) | @Test
method treatsUndeclaredNamespaceAsLocalName (line 248) | @Test
method xmlnsXpathTest (line 266) | @Test
method xhtmlNoNamespace (line 302) | @Test
method canDisableNamespaces (line 313) | @Test
method xpath (line 327) | private NodeList xpath(Document w3cDoc, String query) throws XPathExpr...
method testRoundTripDoctype (line 332) | @Test
method output (line 357) | private String output(String in, boolean modeHtml) {
method assertEqualsIgnoreCase (line 365) | private void assertEqualsIgnoreCase(String want, String have) {
method canOutputHtmlWithoutNamespace (line 370) | @Test
method convertsElementsAndMaintainsSource (line 387) | @Test public void convertsElementsAndMaintainsSource() {
method canXmlParseCdataNodes (line 406) | @Test public void canXmlParseCdataNodes() throws XPathExpressionExcept...
method handlesEmptyDoctype (line 424) | @Test public void handlesEmptyDoctype() {
method testHtmlParseAttributesAreCaseInsensitive (line 432) | @Test void testHtmlParseAttributesAreCaseInsensitive() throws IOExcept...
method doesNotExpandEntities (line 461) | @ParameterizedTest
method undeclaredAttrNamespaceAsString (line 490) | @Test void undeclaredAttrNamespaceAsString() {
method declaredNamespaceIsUsed (line 501) | @Test void declaredNamespaceIsUsed() {
method nestedElementsWithUndeclaredNamespace (line 511) | @Test void nestedElementsWithUndeclaredNamespace() {
method parserProvider (line 521) | private static Stream<Arguments> parserProvider() {
FILE: src/test/java/org/jsoup/integration/Benchmark.java
class Benchmark (line 9) | public class Benchmark {
method run (line 10) | public static void run(Runnable a, Runnable b, int count) {
method time (line 25) | private static long time(Runnable test, int count) {
method print (line 34) | private static void print(String msgFormat, Object... msgParams) {
FILE: src/test/java/org/jsoup/integration/ConnectIT.java
class ConnectIT (line 29) | public class ConnectIT {
method setUp (line 30) | @BeforeAll
method canInterruptBodyStringRead (line 37) | @Test
method canInterruptDocumentRead (line 62) | @Test
method canInterruptThenJoinASpawnedThread (line 90) | @Test public void canInterruptThenJoinASpawnedThread() throws Interrup...
method totalTimeout (line 112) | @Test
method slowReadOk (line 130) | @Test
method readFullyThrowsOnTimeout (line 141) | @Test void readFullyThrowsOnTimeout() throws IOException {
method readBodyThrowsOnTimeout (line 153) | @Test void readBodyThrowsOnTimeout() throws IOException {
method bodyThrowsUncheckedOnTimeout (line 165) | @Test void bodyThrowsUncheckedOnTimeout() throws IOException {
method infiniteReadSupported (line 177) | @Test
method streamParserUncheckedExceptionOnTimeoutInStream (line 188) | @Test void streamParserUncheckedExceptionOnTimeoutInStream() throws IO...
method streamParserCheckedExceptionOnTimeoutInSelect (line 212) | @Test void streamParserCheckedExceptionOnTimeoutInSelect() throws IOEx...
method remainingAfterFirstRead (line 236) | @Test
method noLimitAfterFirstRead (line 273) | @Test
method bodyStreamConstrainedViaReadFully (line 297) | @Test public void bodyStreamConstrainedViaReadFully() throws IOExcepti...
method bodyStreamConstrainedViaBufferUp (line 312) | @Test public void bodyStreamConstrainedViaBufferUp() throws IOException {
FILE: src/test/java/org/jsoup/integration/ConnectTest.java
class ConnectTest (line 56) | public class ConnectTest {
method setUp (line 61) | @BeforeAll
method emptyCookieJar (line 68) | @BeforeEach
method canConnectToLocalServer (line 74) | @Test
method canConnectToLocalTlsServer (line 82) | @Test void canConnectToLocalTlsServer() throws IOException {
method fetchURl (line 89) | @Test
method fetchURIWithWhitespace (line 95) | @Test
method exceptOnUnsupportedProtocol (line 102) | @Test
method ihVal (line 116) | static String ihVal(String key, Document doc) {
method statusMessage (line 121) | @Test void statusMessage() throws IOException {
method throwsExceptionOn404 (line 127) | @Test
method ignoresExceptionIfSoConfigured (line 145) | @Test
method doesPost (line 158) | @Test
method doesPostMultipartWithoutInputstream (line 173) | @Test
method canSendSecFetchHeaders (line 187) | @Test
method secFetchHeadersSurviveRedirect (line 201) | @Test
method sendsRequestBodyJsonWithData (line 216) | @Test
method sendsRequestBodyJsonWithoutData (line 230) | @Test
method sendsRequestBody (line 242) | @Test
method sendsRequestBodyWithUrlParams (line 254) | @Test
method sendsRequestBodyStream (line 267) | @Test void sendsRequestBodyStream() throws IOException {
method doesGet (line 282) | @ParameterizedTest @MethodSource("echoUrls") // http and https
method streamParserGet (line 296) | @ParameterizedTest @MethodSource("echoUrls") // http and https
method echoSelect (line 317) | static String echoSelect(String key) {
method doesPut (line 321) | @Test
method doesDeleteWithBody (line 335) | @Test
method doesDeleteWithoutBody (line 349) | @Test
method postFiles (line 363) | @ParameterizedTest @MethodSource("echoUrls") // http and https
method multipleParsesOkAfterReadFully (line 403) | @Test
method multipleParsesOkAfterBufferUp (line 414) | @Test
method bodyAfterParseThrowsValidationError (line 425) | @Test
method bodyAndBytesAvailableBeforeParse (line 434) | @Test
method parseParseThrowsValidates (line 446) | @Test
method multiCookieSet (line 457) | @Test
method requestCookiesSurviveRedirect (line 476) | @Test public void requestCookiesSurviveRedirect() throws IOException {
method supportsDeflate (line 492) | @Test
method handlesLargerContentLengthParseRead (line 501) | @Test
method handlesWrongContentLengthDuringBufferedRead (line 523) | @Test
method handlesRedirect (line 536) | @Test public void handlesRedirect() throws IOException {
method handlesEmptyRedirect (line 547) | @Test public void handlesEmptyRedirect() {
method doesNotPostFor302 (line 559) | @Test public void doesNotPostFor302() throws IOException {
method doesPostFor307 (line 570) | @Test public void doesPostFor307() throws IOException {
method getUtf8Bom (line 582) | @Test public void getUtf8Bom() throws IOException {
method streamerGetUtf8Bom (line 590) | @Test public void streamerGetUtf8Bom() throws IOException {
method testBinaryContentTypeThrowsException (line 598) | @Test
method testParseRss (line 614) | @Test public void testParseRss() throws IOException {
method testSupplyParserToConnection (line 630) | @Test
method imageXmlMimeType (line 650) | @Test public void imageXmlMimeType() throws IOException {
method canFetchBinaryAsBytes (line 670) | @Test
method handlesUnknownEscapesAcrossBuffer (line 690) | @Test
method postHtmlFile (line 707) | @Test
method fetchHandlesXml (line 737) | @Test
method fetchHandlesXml (line 745) | void fetchHandlesXml(String contentType) throws IOException {
method fetchHandlesXmlAsHtmlWhenParserSet (line 757) | @Test
method combinesSameHeadersWithComma (line 769) | @Test
method sendHeadRequest (line 785) | @Test
method fetchToW3c (line 798) | @Test
method baseHrefCorrectAfterHttpEquiv (line 810) | @Test
method maxBodySize (line 818) | @Test
method repeatable (line 836) | @Test public void repeatable() throws IOException {
method maxBodySizeInReadToByteBuffer (line 845) | @Test
method formLoginFlow (line 871) | @Test void formLoginFlow() throws IOException {
method formLoginFlow2 (line 903) | @Test void formLoginFlow2() throws IOException {
method preservesUrlFragment (line 931) | @Test void preservesUrlFragment() throws IOException {
method fetchUnicodeUrl (line 938) | @Test void fetchUnicodeUrl() throws IOException {
method willEscapePathInRedirect (line 947) | @Test void willEscapePathInRedirect() throws IOException {
method echoUrls (line 963) | private static Stream<String> echoUrls() {
method failsIfNotAuthenticated (line 967) | @ParameterizedTest @MethodSource("echoUrls")
method canAuthenticate (line 978) | @ParameterizedTest @MethodSource("echoUrls")
method incorrectAuth (line 1000) | @ParameterizedTest @MethodSource("echoUrls")
method progressListener (line 1039) | @ParameterizedTest
FILE: src/test/java/org/jsoup/integration/FuzzFixesIT.java
class FuzzFixesIT (line 22) | public class FuzzFixesIT {
method testFiles (line 27) | private static Stream<File> testFiles() {
method testHtmlParse (line 35) | @Disabled // disabled, as these soak up build time and the outcome oug...
method testXmlParse (line 50) | @Disabled // disabled, as these soak up build time and the outcome oug...
FILE: src/test/java/org/jsoup/integration/FuzzFixesTest.java
class FuzzFixesTest (line 22) | public class FuzzFixesTest {
method testFiles (line 24) | private static Stream<File> testFiles() {
method blankAbsAttr (line 32) | @Test
method bookmark (line 40) | @Test
method fragment (line 51) | @Test void fragment() {
method testHtmlParse (line 55) | @ParameterizedTest
method testHtmlFragmentParse (line 64) | @ParameterizedTest
method testXmlParse (line 72) | @ParameterizedTest
FILE: src/test/java/org/jsoup/integration/ParseTest.java
class ParseTest (line 29) | public class ParseTest {
method testHtml5Charset (line 30) | @Test
method testBrokenHtml5CharsetWithASingleDoubleQuote (line 51) | @Test
method testLowercaseUtf8Charset (line 61) | @Test
method testXwiki (line 71) | @Test
method testXwikiExpanded (line 85) | @Test
method testWikiExpandedFromString (line 104) | @Test public void testWikiExpandedFromString() throws IOException {
method testWikiFromString (line 113) | @Test public void testWikiFromString() throws IOException {
method testFileParseNoCharsetMethod (line 122) | @Test public void testFileParseNoCharsetMethod() throws IOException {
method getFile (line 129) | public static File getFile(String resourceName) {
method getPath (line 138) | public static Path getPath(String resourceName) {
method inputStreamFrom (line 147) | public static InputStream inputStreamFrom(String s) {
method getFileAsString (line 151) | public static String getFileAsString(File file) throws IOException {
FILE: src/test/java/org/jsoup/integration/ProxyTest.java
class ProxyTest (line 29) | public class ProxyTest {
method setUp (line 33) | @BeforeAll
method fetchViaProxy (line 39) | @ParameterizedTest @MethodSource("helloUrls")
method helloUrls (line 52) | private static Stream<String> helloUrls() {
method echoUrls (line 56) | private static Stream<String> echoUrls() {
method assertVia (line 60) | private static void assertVia(Connection.Response res) {
method redirectViaProxy (line 64) | @Test void redirectViaProxy() throws IOException {
method proxyForSession (line 79) | @Test void proxyForSession() throws IOException {
method canAuthenticateToProxy (line 97) | @ParameterizedTest @MethodSource("echoUrls")
method assertAuthRequiredException (line 143) | static void assertAuthRequiredException(IOException e) {
method canAuthToProxyAndServer (line 155) | @ParameterizedTest @MethodSource("echoUrls")
FILE: src/test/java/org/jsoup/integration/SafelistExtensionTest.java
class SafelistExtensionTest (line 15) | public class SafelistExtensionTest {
method canCustomizeSafeTests (line 16) | @Test public void canCustomizeSafeTests() {
class OpenSafelist (line 30) | private static class OpenSafelist extends Safelist {
method OpenSafelist (line 31) | public OpenSafelist(Safelist safelist) {
method isSafeAttribute (line 35) | @Override
method isSafeTag (line 42) | @Override
FILE: src/test/java/org/jsoup/integration/SessionIT.java
class SessionIT (line 20) | public class SessionIT {
method setUp (line 21) | @BeforeAll
method multiThread (line 26) | @Test
method multiThreadWithoutNewRequestBlowsUp (line 75) | @Test
method multiThreadWithProgressListener (line 137) | @Test
class ThreadCatcher (line 189) | static class ThreadCatcher implements Thread.UncaughtExceptionHandler {
method uncaughtException (line 193) | @Override
method isInterruptedException (line 204) | private static boolean isInterruptedException(Throwable e) {
FILE: src/test/java/org/jsoup/integration/SessionTest.java
class SessionTest (line 23) | public class SessionTest {
method setUp (line 24) | @BeforeAll
method keyEls (line 29) | private static Elements keyEls(String key, Document doc) {
method keyText (line 33) | private static String keyText(String key, Document doc) {
method testPathScopedCookies (line 37) | @Test
method assertCookieServlet (line 83) | private void assertCookieServlet(Document doc) {
method assertEchoServlet (line 92) | private void assertEchoServlet(Document doc) {
method testPathScopedCookiesOnRedirect (line 99) | @Test
method testCanChangeParsers (line 124) | @Test
method sessionTagSetDoesNotMutateRoot (line 141) | @Test
method sessionTagSetCustomizerDoesNotMutateRoot (line 156) | @Test
method tagSetNamespaceCount (line 176) | private static int tagSetNamespaceCount(TagSet tagSet) {
FILE: src/test/java/org/jsoup/integration/TestServer.java
class TestServer (line 39) | public class TestServer {
method newServer (line 54) | private static Server newServer() {
method TestServer (line 79) | private TestServer() {
method start (line
Condensed preview — 237 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,657K chars).
[
{
"path": ".gitattributes",
"chars": 21,
"preview": "* text=auto eol=lf\n"
},
{
"path": ".github/dependabot.yml",
"chars": 854,
"preview": "version: 2\n\nupdates:\n - package-ecosystem: maven\n directory: /\n schedule:\n interval: weekly\n cooldown:\n "
},
{
"path": ".github/workflows/build.yml",
"chars": 796,
"preview": "name: Build\non:\n push:\n pull_request:\n\njobs:\n test:\n runs-on: ${{ matrix.os }}\n strategy:\n matrix:\n "
},
{
"path": ".github/workflows/cifuzz.yml",
"chars": 695,
"preview": "name: CIFuzz\non: [pull_request]\njobs:\n Fuzzing:\n runs-on: ubuntu-latest\n steps:\n - name: Build Fuzzers\n i"
},
{
"path": ".github/workflows/codeql.yml",
"chars": 671,
"preview": "name: CodeQL\n\non:\n push:\n branches:\n - master\n pull_request:\n\njobs:\n codeql:\n runs-on: ubuntu-latest\n n"
},
{
"path": ".gitignore",
"chars": 123,
"preview": ".idea/\njsoup.iml\njsoup.ipr\njsoup.iws\ntarget/\n.classpath\n.project\n.settings/\n*Thrash*\nbin/\n.vscode/\n.java-version\n.DS_Sto"
},
{
"path": "CHANGES.md",
"chars": 37781,
"preview": "# jsoup Changelog\n\n## 1.22.2 (PENDING)\n\n### Improvements\n* Expanded and clarified `NodeTraversor` support for in-place D"
},
{
"path": "LICENSE",
"chars": 1102,
"preview": "The MIT License\n\nCopyright (c) 2009-2026 Jonathan Hedley <https://jsoup.org/>\n\nPermission is hereby granted, free of cha"
},
{
"path": "README.md",
"chars": 3916,
"preview": "# jsoup: Java HTML Parser\n\n**jsoup** is a Java library that makes it easy to work with real-world HTML and XML. It offer"
},
{
"path": "SECURITY.md",
"chars": 1547,
"preview": "# Security Policy\n\n## Supported Versions\n\nSecurity fixes are not back-ported. Please make sure you are running at least "
},
{
"path": "change-archive.txt",
"chars": 100776,
"preview": "jsoup Changelog Archive\n\nContains change notes for versions 0.1.1 (2010-Jan-31) through 1.17.1 (2023-Nov-27).\nMore recen"
},
{
"path": "pom.xml",
"chars": 20972,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "src/main/java/org/jsoup/Connection.java",
"chars": 44473,
"preview": "package org.jsoup;\n\nimport org.jsoup.helper.RequestAuthenticator;\nimport org.jsoup.nodes.Document;\nimport org.jsoup.pars"
},
{
"path": "src/main/java/org/jsoup/HttpStatusException.java",
"chars": 589,
"preview": "package org.jsoup;\n\nimport java.io.IOException;\n\n/**\n * Signals that a HTTP request resulted in a not OK HTTP response.\n"
},
{
"path": "src/main/java/org/jsoup/Jsoup.java",
"chars": 19746,
"preview": "package org.jsoup;\n\nimport org.jsoup.helper.DataUtil;\nimport org.jsoup.helper.HttpConnection;\nimport org.jsoup.nodes.Doc"
},
{
"path": "src/main/java/org/jsoup/Progress.java",
"chars": 716,
"preview": "package org.jsoup;\n\n@FunctionalInterface\n\npublic interface Progress<ProgressContext> {\n /**\n Called to report pro"
},
{
"path": "src/main/java/org/jsoup/SerializationException.java",
"chars": 1572,
"preview": "package org.jsoup;\n\n/**\n * A SerializationException is raised whenever serialization of a DOM element fails. This except"
},
{
"path": "src/main/java/org/jsoup/UnsupportedMimeTypeException.java",
"chars": 689,
"preview": "package org.jsoup;\n\nimport java.io.IOException;\n\n/**\n * Signals that a HTTP response returned a mime type that is not su"
},
{
"path": "src/main/java/org/jsoup/examples/HtmlToPlainText.java",
"chars": 6484,
"preview": "package org.jsoup.examples;\n\nimport org.jsoup.Connection;\nimport org.jsoup.Jsoup;\nimport org.jsoup.internal.StringUtil;\n"
},
{
"path": "src/main/java/org/jsoup/examples/ListLinks.java",
"chars": 2032,
"preview": "package org.jsoup.examples;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.helper.Validate;\nimport org.jsoup.nodes.Document;\n"
},
{
"path": "src/main/java/org/jsoup/examples/Wikipedia.java",
"chars": 963,
"preview": "package org.jsoup.examples;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.nodes.Document;\nimport org.jsoup.nodes.Element;\nim"
},
{
"path": "src/main/java/org/jsoup/examples/package-info.java",
"chars": 382,
"preview": "/**\n Contains example programs and use of jsoup. See the <a href=\"https://jsoup.org/cookbook/\">jsoup cookbook</a>.\n <p>T"
},
{
"path": "src/main/java/org/jsoup/helper/AuthenticationHandler.java",
"chars": 3786,
"preview": "package org.jsoup.helper;\n\nimport org.jspecify.annotations.Nullable;\n\nimport java.lang.reflect.Constructor;\nimport java."
},
{
"path": "src/main/java/org/jsoup/helper/CookieUtil.java",
"chars": 5302,
"preview": "package org.jsoup.helper;\n\nimport org.jsoup.Connection;\nimport org.jsoup.internal.StringUtil;\nimport org.jsoup.parser.Ch"
},
{
"path": "src/main/java/org/jsoup/helper/DataUtil.java",
"chars": 18932,
"preview": "package org.jsoup.helper;\n\nimport org.jsoup.Connection;\nimport org.jsoup.internal.ControllableInputStream;\nimport org.js"
},
{
"path": "src/main/java/org/jsoup/helper/HttpConnection.java",
"chars": 50921,
"preview": "package org.jsoup.helper;\n\nimport org.jsoup.Connection;\nimport org.jsoup.HttpStatusException;\nimport org.jsoup.Progress;"
},
{
"path": "src/main/java/org/jsoup/helper/Re2jRegex.java",
"chars": 1473,
"preview": "package org.jsoup.helper;\n\n/**\n re2j-backed Regex implementation; must only be touched when re2j is on the classpath.\n *"
},
{
"path": "src/main/java/org/jsoup/helper/Regex.java",
"chars": 4246,
"preview": "package org.jsoup.helper;\n\nimport org.jsoup.internal.SharedConstants;\n\nimport java.lang.reflect.InvocationTargetExceptio"
},
{
"path": "src/main/java/org/jsoup/helper/RequestAuthenticator.java",
"chars": 2934,
"preview": "package org.jsoup.helper;\n\nimport org.jsoup.Connection;\nimport org.jspecify.annotations.Nullable;\n\nimport java.net.Authe"
},
{
"path": "src/main/java/org/jsoup/helper/RequestDispatch.java",
"chars": 2051,
"preview": "package org.jsoup.helper;\n\nimport org.jsoup.internal.SharedConstants;\nimport org.jspecify.annotations.Nullable;\n\nimport "
},
{
"path": "src/main/java/org/jsoup/helper/RequestExecutor.java",
"chars": 749,
"preview": "package org.jsoup.helper;\n\nimport static org.jsoup.helper.HttpConnection.Request;\nimport static org.jsoup.helper.HttpCon"
},
{
"path": "src/main/java/org/jsoup/helper/UrlBuilder.java",
"chars": 4295,
"preview": "package org.jsoup.helper;\n\nimport org.jsoup.Connection;\nimport org.jsoup.internal.StringUtil;\nimport org.jspecify.annota"
},
{
"path": "src/main/java/org/jsoup/helper/UrlConnectionExecutor.java",
"chars": 4993,
"preview": "package org.jsoup.helper;\n\nimport org.jsoup.Connection;\nimport org.jspecify.annotations.Nullable;\n\nimport javax.net.ssl."
},
{
"path": "src/main/java/org/jsoup/helper/Validate.java",
"chars": 8700,
"preview": "package org.jsoup.helper;\n\nimport org.jspecify.annotations.Nullable;\n\n/**\n * Validators to check that method arguments m"
},
{
"path": "src/main/java/org/jsoup/helper/ValidationException.java",
"chars": 972,
"preview": "package org.jsoup.helper;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n Validation exceptions, as thrown by "
},
{
"path": "src/main/java/org/jsoup/helper/W3CDom.java",
"chars": 20525,
"preview": "package org.jsoup.helper;\n\nimport org.jsoup.internal.Normalizer;\nimport org.jsoup.internal.StringUtil;\nimport org.jsoup."
},
{
"path": "src/main/java/org/jsoup/helper/package-info.java",
"chars": 151,
"preview": "/**\n Package containing classes supporting the core jsoup code.\n */\n@NullMarked\npackage org.jsoup.helper;\n\nimport org.js"
},
{
"path": "src/main/java/org/jsoup/internal/ControllableInputStream.java",
"chars": 10248,
"preview": "package org.jsoup.internal;\n\nimport org.jsoup.Progress;\nimport org.jsoup.helper.Validate;\nimport org.jspecify.annotation"
},
{
"path": "src/main/java/org/jsoup/internal/Functions.java",
"chars": 1426,
"preview": "package org.jsoup.internal;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java"
},
{
"path": "src/main/java/org/jsoup/internal/Normalizer.java",
"chars": 1418,
"preview": "package org.jsoup.internal;\n\nimport org.jsoup.nodes.Attribute;\nimport org.jsoup.nodes.Document;\nimport org.jspecify.anno"
},
{
"path": "src/main/java/org/jsoup/internal/QuietAppendable.java",
"chars": 2637,
"preview": "package org.jsoup.internal;\n\nimport org.jsoup.SerializationException;\n\nimport java.io.IOException;\n\n/**\n A jsoup interna"
},
{
"path": "src/main/java/org/jsoup/internal/SharedConstants.java",
"chars": 1126,
"preview": "package org.jsoup.internal;\n\n/**\n jsoup constants used between packages. Do not use as they may change without warning. "
},
{
"path": "src/main/java/org/jsoup/internal/SimpleBufferedInput.java",
"chars": 5492,
"preview": "package org.jsoup.internal;\n\nimport org.jsoup.helper.Validate;\nimport org.jspecify.annotations.Nullable;\n\nimport java.io"
},
{
"path": "src/main/java/org/jsoup/internal/SimpleStreamReader.java",
"chars": 3412,
"preview": "package org.jsoup.internal;\n\nimport org.jsoup.helper.Validate;\nimport org.jspecify.annotations.Nullable;\n\nimport java.io"
},
{
"path": "src/main/java/org/jsoup/internal/SoftPool.java",
"chars": 2400,
"preview": "package org.jsoup.internal;\n\nimport java.lang.ref.SoftReference;\nimport java.util.ArrayDeque;\nimport java.util.function."
},
{
"path": "src/main/java/org/jsoup/internal/StringUtil.java",
"chars": 15528,
"preview": "package org.jsoup.internal;\n\nimport org.jsoup.helper.Validate;\nimport org.jspecify.annotations.Nullable;\n\nimport java.ne"
},
{
"path": "src/main/java/org/jsoup/internal/package-info.java",
"chars": 219,
"preview": "/**\n * Util methods used by Jsoup. Please don't depend on the APIs implemented here as the contents may change without\n "
},
{
"path": "src/main/java/org/jsoup/nodes/Attribute.java",
"chars": 13663,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.internal.Normalizer;\nimport org.jsoup.inter"
},
{
"path": "src/main/java/org/jsoup/nodes/Attributes.java",
"chars": 23851,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.internal.QuietAppendable;\nimport org.jsoup."
},
{
"path": "src/main/java/org/jsoup/nodes/CDataNode.java",
"chars": 841,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.internal.QuietAppendable;\n\n/**\n * A Character Data node, to support CDATA sec"
},
{
"path": "src/main/java/org/jsoup/nodes/Comment.java",
"chars": 2255,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.internal.QuietAppendable;\nimport org.jsoup.parser.Parser;\nimport org.jspecify"
},
{
"path": "src/main/java/org/jsoup/nodes/DataNode.java",
"chars": 1956,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.internal.QuietAppendable;\n\n/**\n A data node, for contents of style, script ta"
},
{
"path": "src/main/java/org/jsoup/nodes/Document.java",
"chars": 20675,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.Connection;\nimport org.jsoup.Jsoup;\nimport org.jsoup.helper.DataUtil;\nimport "
},
{
"path": "src/main/java/org/jsoup/nodes/DocumentType.java",
"chars": 3053,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.internal.QuietAppendable;\nimport org.jsoup.internal.StringUtil;\nimport org.js"
},
{
"path": "src/main/java/org/jsoup/nodes/Element.java",
"chars": 79721,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.internal.Normalizer;\nimport org.jsoup.inter"
},
{
"path": "src/main/java/org/jsoup/nodes/Entities.java",
"chars": 17091,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.helper.DataUtil;\nimport org.jsoup.internal.QuietAppendable;\nimport org.jsoup."
},
{
"path": "src/main/java/org/jsoup/nodes/EntitiesData.java",
"chars": 33565,
"preview": "package org.jsoup.nodes;\n\n/**\n * Holds packed data that represents Entity name=value pairs. Parsed by Entities, created "
},
{
"path": "src/main/java/org/jsoup/nodes/FormElement.java",
"chars": 5802,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.Connection;\nimport org.jsoup.Jsoup;\nimport org.jsoup.helper.HttpConnection;\ni"
},
{
"path": "src/main/java/org/jsoup/nodes/LeafNode.java",
"chars": 3146,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.internal.QuietAppendable;\nimport org.jspeci"
},
{
"path": "src/main/java/org/jsoup/nodes/Node.java",
"chars": 35974,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.internal.QuietAppendable;\nimport org.jsoup."
},
{
"path": "src/main/java/org/jsoup/nodes/NodeIterator.java",
"chars": 4567,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.helper.Validate;\nimport org.jspecify.annotations.Nullable;\n\nimport java.util."
},
{
"path": "src/main/java/org/jsoup/nodes/NodeUtils.java",
"chars": 2760,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.helper.W3CDom;\nimport org.jsoup.parser.Html"
},
{
"path": "src/main/java/org/jsoup/nodes/Printer.java",
"chars": 8681,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.internal.QuietAppendable;\nimport org.jsoup.internal.StringUtil;\nimport org.js"
},
{
"path": "src/main/java/org/jsoup/nodes/PseudoTextElement.java",
"chars": 839,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.internal.QuietAppendable;\nimport org.jsoup.parser.Tag;\n\n/**\n * Represents a {"
},
{
"path": "src/main/java/org/jsoup/nodes/Range.java",
"chars": 8461,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.internal.StringUtil;\n\nimport java.util.Objects;\n\nimport static org.jsoup.inte"
},
{
"path": "src/main/java/org/jsoup/nodes/TextNode.java",
"chars": 3584,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.internal.QuietAppendable;\nimport org.jsoup."
},
{
"path": "src/main/java/org/jsoup/nodes/XmlDeclaration.java",
"chars": 2743,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.internal.QuietAppendable;\nimport org.jsoup.internal.StringUtil;\n\n\n/**\n * An X"
},
{
"path": "src/main/java/org/jsoup/nodes/package-info.java",
"chars": 122,
"preview": "/**\n HTML document structure nodes.\n */\n@NullMarked\npackage org.jsoup.nodes;\n\nimport org.jspecify.annotations.NullMarked"
},
{
"path": "src/main/java/org/jsoup/package-info.java",
"chars": 202,
"preview": "/**\n Contains the main {@link org.jsoup.Jsoup} class, which provides convenient static access to the jsoup functionality"
},
{
"path": "src/main/java/org/jsoup/parser/CharacterReader.java",
"chars": 23750,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.internal.SoftPool;\nimport org.jsoup.intern"
},
{
"path": "src/main/java/org/jsoup/parser/HtmlTreeBuilder.java",
"chars": 42482,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.internal.Normalizer;\nimport org.jsoup.inte"
},
{
"path": "src/main/java/org/jsoup/parser/HtmlTreeBuilderState.java",
"chars": 90934,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.internal.StringUtil;\nimport org.jsoup.node"
},
{
"path": "src/main/java/org/jsoup/parser/ParseError.java",
"chars": 1617,
"preview": "package org.jsoup.parser;\n\n/**\n * A Parse Error records an error in the input HTML that occurs in either the tokenisatio"
},
{
"path": "src/main/java/org/jsoup/parser/ParseErrorList.java",
"chars": 1241,
"preview": "package org.jsoup.parser;\n\nimport java.util.ArrayList;\n\n/**\n * A container for ParseErrors.\n * \n * @author Jonathan Hedl"
},
{
"path": "src/main/java/org/jsoup/parser/ParseSettings.java",
"chars": 2362,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.nodes.Attributes;\nimport org.jspecify.annotations.Nullable;\n\nimport static o"
},
{
"path": "src/main/java/org/jsoup/parser/Parser.java",
"chars": 14915,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.nodes.Document;\nimport org.jsoup.nodes.Ele"
},
{
"path": "src/main/java/org/jsoup/parser/StreamParser.java",
"chars": 16872,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.Connection;\nimport org.jsoup.helper.Validate;\nimport org.jsoup.nodes.Documen"
},
{
"path": "src/main/java/org/jsoup/parser/Tag.java",
"chars": 11887,
"preview": "package org.jsoup.parser;\n\nimport org.jspecify.annotations.Nullable;\n\nimport java.util.Objects;\n\nimport static org.jsoup"
},
{
"path": "src/main/java/org/jsoup/parser/TagSet.java",
"chars": 12497,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.internal.SharedConstants;\nimport org.jspec"
},
{
"path": "src/main/java/org/jsoup/parser/Token.java",
"chars": 16620,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.internal.Normalizer;\nimport org.jsoup.node"
},
{
"path": "src/main/java/org/jsoup/parser/TokenData.java",
"chars": 2451,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.internal.StringUtil;\nimport org.jspecify.annotations.Nullable;\n\n/**\n A value"
},
{
"path": "src/main/java/org/jsoup/parser/TokenQueue.java",
"chars": 17091,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.internal.StringUtil;\nimport org.jsoup.helper.Validate;\n\n/**\n A character rea"
},
{
"path": "src/main/java/org/jsoup/parser/Tokeniser.java",
"chars": 13257,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.internal.StringUtil;\nimport org.jsoup.node"
},
{
"path": "src/main/java/org/jsoup/parser/TokeniserState.java",
"chars": 62822,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.nodes.DocumentType;\n\nimport static org.jsoup.nodes.Document.OutputSettings.S"
},
{
"path": "src/main/java/org/jsoup/parser/TreeBuilder.java",
"chars": 11737,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.internal.SharedConstants;\nimport org.jsoup"
},
{
"path": "src/main/java/org/jsoup/parser/XmlTreeBuilder.java",
"chars": 10232,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.internal.SharedConstants;\nimport org.jsoup"
},
{
"path": "src/main/java/org/jsoup/parser/package-info.java",
"chars": 158,
"preview": "/**\n Contains the HTML parser, tag specifications, and HTML tokeniser.\n */\n@NullMarked\npackage org.jsoup.parser;\n\nimport"
},
{
"path": "src/main/java/org/jsoup/safety/Cleaner.java",
"chars": 10888,
"preview": "package org.jsoup.safety;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.nodes.Attribute;\nimport org.jsoup.nodes.At"
},
{
"path": "src/main/java/org/jsoup/safety/Safelist.java",
"chars": 27530,
"preview": "package org.jsoup.safety;\n\n/*\n Thank you to Ryan Grove (wonko.com) for the Ruby HTML cleaner http://github.com/rgrove"
},
{
"path": "src/main/java/org/jsoup/safety/package-info.java",
"chars": 150,
"preview": "/**\n Contains the jsoup HTML cleaner, and safelist definitions.\n */\n@NullMarked\npackage org.jsoup.safety;\n\nimport org.js"
},
{
"path": "src/main/java/org/jsoup/select/Collector.java",
"chars": 4122,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.nodes.Element;\nimport org.jsoup.nodes.Leaf"
},
{
"path": "src/main/java/org/jsoup/select/CombiningEvaluator.java",
"chars": 4508,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.internal.StringUtil;\nimport org.jsoup.nodes.Element;\nimport org.jsoup.nodes."
},
{
"path": "src/main/java/org/jsoup/select/Elements.java",
"chars": 23660,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.internal.StringUtil;\nimport org.jsoup.node"
},
{
"path": "src/main/java/org/jsoup/select/Evaluator.java",
"chars": 30668,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.nodes.Comment;\nimport org.jsoup.nodes.Docu"
},
{
"path": "src/main/java/org/jsoup/select/NodeEvaluator.java",
"chars": 2873,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.internal.StringUtil;\nimport org.jsoup.nodes.Element;\nimport org.jsoup.nodes."
},
{
"path": "src/main/java/org/jsoup/select/NodeFilter.java",
"chars": 2658,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.nodes.Node;\n\n/**\n A controllable Node visitor interface. Execute via {@link "
},
{
"path": "src/main/java/org/jsoup/select/NodeTraversor.java",
"chars": 7356,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.nodes.Element;\nimport org.jsoup.nodes.Node"
},
{
"path": "src/main/java/org/jsoup/select/NodeVisitor.java",
"chars": 3748,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.nodes.Element;\nimport org.jsoup.nodes.Node;\n\n/**\n Node visitor interface, us"
},
{
"path": "src/main/java/org/jsoup/select/Nodes.java",
"chars": 9781,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.internal.StringUtil;\nimport org.jsoup.node"
},
{
"path": "src/main/java/org/jsoup/select/QueryParser.java",
"chars": 19999,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.helper.Regex;\nimport org.jsoup.internal.StringUtil;\nimport org.jsoup.helper."
},
{
"path": "src/main/java/org/jsoup/select/Selector.java",
"chars": 23708,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.helper.Validate;\nimport org.jsoup.nodes.Element;\nimport org.jsoup.nodes.Node"
},
{
"path": "src/main/java/org/jsoup/select/StructuralEvaluator.java",
"chars": 9952,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.internal.SoftPool;\nimport org.jsoup.internal.StringUtil;\nimport org.jsoup.no"
},
{
"path": "src/main/java/org/jsoup/select/package-info.java",
"chars": 214,
"preview": "/**\n Packages to support the CSS-style element selector.\n {@link org.jsoup.select.Selector Selector defines the query sy"
},
{
"path": "src/main/java11/module-info.java",
"chars": 393,
"preview": "module org.jsoup {\n exports org.jsoup;\n exports org.jsoup.helper;\n exports org.jsoup.nodes;\n exports org.jso"
},
{
"path": "src/main/java11/org/jsoup/helper/HttpClientExecutor.java",
"chars": 7462,
"preview": "package org.jsoup.helper;\n\nimport org.jsoup.Connection;\nimport org.jspecify.annotations.Nullable;\n\nimport java.io.ByteAr"
},
{
"path": "src/main/java11/org/jsoup/helper/RequestAuthHandler.java",
"chars": 1345,
"preview": "package org.jsoup.helper;\n\nimport java.net.HttpURLConnection;\nimport java.net.http.HttpClient;\n\n/**\n A per-request authe"
},
{
"path": "src/main/javadoc/overview.html",
"chars": 1194,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <title>jsoup Javadoc overview</title>\n</head>\n<body>\n<h1>jsoup: Java HTML pars"
},
{
"path": "src/main/resources/META-INF/proguard/org.jsoup_jsoup.pro",
"chars": 29,
"preview": "-dontwarn com.google.re2j.**\n"
},
{
"path": "src/test/java/org/jsoup/JsoupTest.java",
"chars": 1097,
"preview": "package org.jsoup;\n\nimport org.jsoup.integration.ParseTest;\nimport org.jsoup.nodes.Document;\nimport org.jsoup.parser.Par"
},
{
"path": "src/test/java/org/jsoup/MultiLocaleExtension.java",
"chars": 1224,
"preview": "package org.jsoup;\n\nimport org.junit.jupiter.api.extension.AfterEachCallback;\nimport org.junit.jupiter.api.extension.Ext"
},
{
"path": "src/test/java/org/jsoup/SerializationExceptionTest.java",
"chars": 694,
"preview": "package org.jsoup;\n\nimport org.junit.jupiter.api.Test;\n\nimport static org.junit.jupiter.api.Assertions.*;\n\npublic class "
},
{
"path": "src/test/java/org/jsoup/TextUtil.java",
"chars": 1010,
"preview": "package org.jsoup;\n\nimport java.util.regex.Pattern;\n\n/**\n Text utils to ease testing\n\n @author Jonathan Hedley, jonathan"
},
{
"path": "src/test/java/org/jsoup/helper/AuthenticationHandlerTest.java",
"chars": 251,
"preview": "package org.jsoup.helper;\n\npublic class AuthenticationHandlerTest {\n public static final int MaxAttempts = Authentica"
},
{
"path": "src/test/java/org/jsoup/helper/CookieUtilTest.java",
"chars": 885,
"preview": "package org.jsoup.helper;\n\nimport org.junit.jupiter.api.Test;\n\nimport static org.junit.jupiter.api.Assertions.*;\n\nclass "
},
{
"path": "src/test/java/org/jsoup/helper/DataUtilTest.java",
"chars": 18700,
"preview": "package org.jsoup.helper;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.integration.ParseTest;\nimport org.jsoup.internal.Con"
},
{
"path": "src/test/java/org/jsoup/helper/HttpConnectionTest.java",
"chars": 17238,
"preview": "package org.jsoup.helper;\n\nimport org.jsoup.Connection;\nimport org.jsoup.Jsoup;\nimport org.jsoup.MultiLocaleExtension.Mu"
},
{
"path": "src/test/java/org/jsoup/helper/RegexTest.java",
"chars": 2216,
"preview": "package org.jsoup.helper;\n\nimport org.jsoup.select.QueryParser;\nimport org.jsoup.select.Selector;\nimport org.junit.jupit"
},
{
"path": "src/test/java/org/jsoup/helper/ValidateTest.java",
"chars": 8419,
"preview": "package org.jsoup.helper;\n\nimport org.junit.jupiter.api.Assertions;\nimport org.junit.jupiter.api.Test;\n\nimport static or"
},
{
"path": "src/test/java/org/jsoup/helper/W3CDomTest.java",
"chars": 26833,
"preview": "package org.jsoup.helper;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.TextUtil;\nimport org.jsoup.integration.ParseTest;\nim"
},
{
"path": "src/test/java/org/jsoup/integration/Benchmark.java",
"chars": 1067,
"preview": "package org.jsoup.integration;\n\nimport java.util.Date;\n\n/**\n Does an A/B test on two methods, and prints out how long ea"
},
{
"path": "src/test/java/org/jsoup/integration/ConnectIT.java",
"chars": 11826,
"preview": "package org.jsoup.integration;\n\nimport org.jsoup.Connection;\nimport org.jsoup.Jsoup;\nimport org.jsoup.helper.DataUtil;\ni"
},
{
"path": "src/test/java/org/jsoup/integration/ConnectTest.java",
"chars": 45395,
"preview": "package org.jsoup.integration;\n\nimport org.jsoup.Connection;\nimport org.jsoup.HttpStatusException;\nimport org.jsoup.Jsou"
},
{
"path": "src/test/java/org/jsoup/integration/FuzzFixesIT.java",
"chars": 2622,
"preview": "package org.jsoup.integration;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.nodes.Document;\nimport org.jsoup.parser.Parser;"
},
{
"path": "src/test/java/org/jsoup/integration/FuzzFixesTest.java",
"chars": 2599,
"preview": "package org.jsoup.integration;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.nodes.Document;\nimport org.jsoup.nodes.Element;"
},
{
"path": "src/test/java/org/jsoup/integration/ParseTest.java",
"chars": 7709,
"preview": "package org.jsoup.integration;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.helper.DataUtil;\nimport org.jsoup.nodes.Documen"
},
{
"path": "src/test/java/org/jsoup/integration/ProxyTest.java",
"chars": 7876,
"preview": "package org.jsoup.integration;\n\nimport org.jsoup.Connection;\nimport org.jsoup.Jsoup;\nimport org.jsoup.integration.servle"
},
{
"path": "src/test/java/org/jsoup/integration/SafelistExtensionTest.java",
"chars": 1526,
"preview": "package org.jsoup.integration;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.TextUtil;\nimport org.jsoup.nodes.Attribute;\nimp"
},
{
"path": "src/test/java/org/jsoup/integration/SessionIT.java",
"chars": 8328,
"preview": "package org.jsoup.integration;\n\nimport org.jsoup.Connection;\nimport org.jsoup.Jsoup;\nimport org.jsoup.integration.servle"
},
{
"path": "src/test/java/org/jsoup/integration/SessionTest.java",
"chars": 7446,
"preview": "package org.jsoup.integration;\n\nimport org.jsoup.Connection;\nimport org.jsoup.Jsoup;\nimport org.jsoup.integration.servle"
},
{
"path": "src/test/java/org/jsoup/integration/TestServer.java",
"chars": 7987,
"preview": "package org.jsoup.integration;\n\nimport org.eclipse.jetty.http.HttpVersion;\nimport org.eclipse.jetty.server.Connector;\nim"
},
{
"path": "src/test/java/org/jsoup/integration/servlets/AuthFilter.java",
"chars": 4755,
"preview": "package org.jsoup.integration.servlets;\n\nimport javax.servlet.Filter;\nimport javax.servlet.FilterChain;\nimport javax.ser"
},
{
"path": "src/test/java/org/jsoup/integration/servlets/BaseServlet.java",
"chars": 1119,
"preview": "package org.jsoup.integration.servlets;\n\nimport javax.servlet.ServletException;\nimport javax.servlet.http.HttpServlet;\ni"
},
{
"path": "src/test/java/org/jsoup/integration/servlets/CookieServlet.java",
"chars": 2252,
"preview": "package org.jsoup.integration.servlets;\n\nimport org.jsoup.integration.TestServer;\n\nimport javax.servlet.http.Cookie;\nimp"
},
{
"path": "src/test/java/org/jsoup/integration/servlets/DeflateServlet.java",
"chars": 1428,
"preview": "package org.jsoup.integration.servlets;\n\nimport org.jsoup.integration.TestServer;\n\nimport javax.servlet.http.HttpServlet"
},
{
"path": "src/test/java/org/jsoup/integration/servlets/EchoServlet.java",
"chars": 5037,
"preview": "package org.jsoup.integration.servlets;\n\nimport org.eclipse.jetty.server.Request;\nimport org.jsoup.helper.DataUtil;\nimpo"
},
{
"path": "src/test/java/org/jsoup/integration/servlets/FileServlet.java",
"chars": 2015,
"preview": "package org.jsoup.integration.servlets;\n\nimport org.jsoup.integration.ParseTest;\nimport org.jsoup.integration.TestServer"
},
{
"path": "src/test/java/org/jsoup/integration/servlets/HelloServlet.java",
"chars": 758,
"preview": "package org.jsoup.integration.servlets;\n\nimport org.jsoup.integration.TestServer;\n\nimport javax.servlet.http.HttpServlet"
},
{
"path": "src/test/java/org/jsoup/integration/servlets/InterruptedServlet.java",
"chars": 1424,
"preview": "package org.jsoup.integration.servlets;\n\nimport org.jsoup.integration.TestServer;\nimport org.jsoup.parser.CharacterReade"
},
{
"path": "src/test/java/org/jsoup/integration/servlets/ProxyServlet.java",
"chars": 3085,
"preview": "package org.jsoup.integration.servlets;\n\nimport org.eclipse.jetty.client.api.Response;\nimport org.eclipse.jetty.proxy.As"
},
{
"path": "src/test/java/org/jsoup/integration/servlets/RedirectServlet.java",
"chars": 1530,
"preview": "package org.jsoup.integration.servlets;\n\nimport org.jsoup.integration.TestServer;\n\nimport javax.servlet.http.Cookie;\nimp"
},
{
"path": "src/test/java/org/jsoup/integration/servlets/SlowRider.java",
"chars": 2727,
"preview": "package org.jsoup.integration.servlets;\n\nimport org.jsoup.integration.TestServer;\n\nimport javax.servlet.http.HttpServlet"
},
{
"path": "src/test/java/org/jsoup/internal/ControllableInputStreamTest.java",
"chars": 2958,
"preview": "package org.jsoup.internal;\n\nimport org.junit.jupiter.api.Test;\n\nimport java.io.ByteArrayInputStream;\nimport java.io.Fil"
},
{
"path": "src/test/java/org/jsoup/internal/QuietAppendableTest.java",
"chars": 2499,
"preview": "package org.jsoup.internal;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.SerializationException;\nimport org.jsoup.nodes.Doc"
},
{
"path": "src/test/java/org/jsoup/internal/ReaderTest.java",
"chars": 2077,
"preview": "package org.jsoup.internal;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.nodes.Document;\nimport org.jsoup.parser.CharacterR"
},
{
"path": "src/test/java/org/jsoup/internal/SoftPoolTest.java",
"chars": 4766,
"preview": "package org.jsoup.internal;\n\nimport org.junit.jupiter.api.Test;\n\nimport java.util.ArrayDeque;\nimport java.util.ArrayList"
},
{
"path": "src/test/java/org/jsoup/internal/StringUtilTest.java",
"chars": 11483,
"preview": "package org.jsoup.internal;\n\nimport org.jsoup.Jsoup;\nimport org.junit.jupiter.api.Test;\n\nimport java.util.Arrays;\nimport"
},
{
"path": "src/test/java/org/jsoup/nodes/AttributeTest.java",
"chars": 4351,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.parser.ParseSettings;\nimport org.jsoup.parser.Parser;"
},
{
"path": "src/test/java/org/jsoup/nodes/AttributesTest.java",
"chars": 13396,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.Jsoup;\nimport org.junit.jupiter.api.Test;\n\nimport java.util.ConcurrentModific"
},
{
"path": "src/test/java/org/jsoup/nodes/BuildEntities.java",
"chars": 4561,
"preview": "package org.jsoup.nodes;\n\nimport com.google.gson.Gson;\nimport com.google.gson.reflect.TypeToken;\nimport org.jsoup.Connec"
},
{
"path": "src/test/java/org/jsoup/nodes/CommentTest.java",
"chars": 2505,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.Jsoup;\nimport org.junit.jupiter.api.Test;\n\nimport static org.junit.jupiter.ap"
},
{
"path": "src/test/java/org/jsoup/nodes/DataNodeTest.java",
"chars": 3116,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.internal.QuietAppendable;\nimport org.junit.jupiter.api.Test;\n\nimport static o"
},
{
"path": "src/test/java/org/jsoup/nodes/DocumentTest.java",
"chars": 23545,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.TextUtil;\nimport org.jsoup.integration.ParseTest;\nimp"
},
{
"path": "src/test/java/org/jsoup/nodes/DocumentTypeTest.java",
"chars": 3656,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.parser.Parser;\nimport org.junit.jupiter.api.Test;\n\nim"
},
{
"path": "src/test/java/org/jsoup/nodes/ElementIT.java",
"chars": 8597,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.parser.Parser;\nimport org.jsoup.select.Elements;\nimpo"
},
{
"path": "src/test/java/org/jsoup/nodes/ElementTest.java",
"chars": 129917,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.TextUtil;\nimport org.jsoup.helper.ValidationException"
},
{
"path": "src/test/java/org/jsoup/nodes/EntitiesTest.java",
"chars": 9428,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.parser.Parser;\nimport org.junit.jupiter.api.Test;\n\nim"
},
{
"path": "src/test/java/org/jsoup/nodes/FormElementTest.java",
"chars": 10139,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.Connection;\nimport org.jsoup.Jsoup;\nimport org.jsoup.integration.TestServer;\n"
},
{
"path": "src/test/java/org/jsoup/nodes/LeafNodeTest.java",
"chars": 2307,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.select.Elements;\nimport org.jsoup.select.NodeFilter;\n"
},
{
"path": "src/test/java/org/jsoup/nodes/NodeIteratorTest.java",
"chars": 9688,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.Jsoup;\nimport org.junit.jupiter.api.Test;\n\nimport java.util.Iterator;\nimport "
},
{
"path": "src/test/java/org/jsoup/nodes/NodeStreamTest.java",
"chars": 2283,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.Jsoup;\nimport org.junit.jupiter.api.Test;\n\nimport java.util.Optional;\nimport "
},
{
"path": "src/test/java/org/jsoup/nodes/NodeTest.java",
"chars": 20206,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.TextUtil;\nimport org.jsoup.parser.Tag;\nimport org.jso"
},
{
"path": "src/test/java/org/jsoup/nodes/PrinterTest.java",
"chars": 4172,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.Jsoup;\nimport org.junit.jupiter.api.Test;\n\nimport java.io.File;\nimport java.i"
},
{
"path": "src/test/java/org/jsoup/nodes/TextNodeTest.java",
"chars": 8364,
"preview": "package org.jsoup.nodes;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.TextUtil;\nimport org.jsoup.helper.ValidationException"
},
{
"path": "src/test/java/org/jsoup/parser/AttributeParseTest.java",
"chars": 4045,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.nodes.Attribute;\nimport org.jsoup.nodes.Attributes;\n"
},
{
"path": "src/test/java/org/jsoup/parser/CharacterReaderTest.java",
"chars": 20081,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.integration.ParseTest;\nimport org.jsoup.internal.StringUtil;\nimport org.juni"
},
{
"path": "src/test/java/org/jsoup/parser/HtmlParserTest.java",
"chars": 111727,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.TextUtil;\nimport org.jsoup.integration.ParseTest;\nim"
},
{
"path": "src/test/java/org/jsoup/parser/HtmlTreeBuilderStateTest.java",
"chars": 3717,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.internal.StringUtil;\nimport org.jsoup.parser.HtmlTre"
},
{
"path": "src/test/java/org/jsoup/parser/HtmlTreeBuilderTest.java",
"chars": 4317,
"preview": "package org.jsoup.parser;\n\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.nodes.DataNode;\nimport org.jsoup.nodes.Document;\nim"
},
{
"path": "src/test/java/org/jsoup/parser/ParserIT.java",
"chars": 4702,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.nodes.Document;\nimport org.jsoup.nodes.Element;\nimport org.junit.jupiter.api"
},
{
"path": "src/test/java/org/jsoup/parser/ParserSettingsTest.java",
"chars": 1814,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.MultiLocaleExtension.MultiLocaleTest;\nimport org.jsoup.nodes.Attributes;\n\nim"
},
{
"path": "src/test/java/org/jsoup/parser/ParserTest.java",
"chars": 4450,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.nodes.Document;\nimport org.junit.jupiter.api.Test;\n\n"
},
{
"path": "src/test/java/org/jsoup/parser/PositionTest.java",
"chars": 29025,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.TextUtil;\nimport org.jsoup.integration.servlets.File"
},
{
"path": "src/test/java/org/jsoup/parser/StreamParserTest.java",
"chars": 19022,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.Connection;\nimport org.jsoup.Jsoup;\nimport org.jsoup.helper.DataUtil;\nimport"
},
{
"path": "src/test/java/org/jsoup/parser/TagSetTest.java",
"chars": 8361,
"preview": "package org.jsoup.parser;\nimport org.jsoup.Jsoup;\nimport org.jsoup.nodes.Document;\nimport org.jsoup.nodes.Element;\nimpor"
},
{
"path": "src/test/java/org/jsoup/parser/TagTest.java",
"chars": 8476,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.MultiLocaleExtension.MultiLocaleTest;\nimport org.jso"
},
{
"path": "src/test/java/org/jsoup/parser/TokenQueueTest.java",
"chars": 14653,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.nodes.Document;\nimport org.junit.jupiter.api.Test;\ni"
},
{
"path": "src/test/java/org/jsoup/parser/TokeniserStateTest.java",
"chars": 11934,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.TextUtil;\nimport org.jsoup.nodes.Comment;\nimport org"
},
{
"path": "src/test/java/org/jsoup/parser/TokeniserTest.java",
"chars": 8052,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.nodes.*;\nimport org.jsoup.select.Elements;\nimport or"
},
{
"path": "src/test/java/org/jsoup/parser/XmlTreeBuilderTest.java",
"chars": 29984,
"preview": "package org.jsoup.parser;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.TextUtil;\nimport org.jsoup.nodes.*;\nimport org.jsoup"
},
{
"path": "src/test/java/org/jsoup/safety/CleanerTest.java",
"chars": 29921,
"preview": "package org.jsoup.safety;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.MultiLocaleExtension.MultiLocaleTest;\nimport org.jso"
},
{
"path": "src/test/java/org/jsoup/safety/SafelistTest.java",
"chars": 3829,
"preview": "package org.jsoup.safety;\n\nimport org.jsoup.helper.ValidationException;\nimport org.jsoup.nodes.Attribute;\nimport org.jso"
},
{
"path": "src/test/java/org/jsoup/select/CssTest.java",
"chars": 7420,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.nodes.Document;\nimport org.jsoup.parser.Tag;\nimport "
},
{
"path": "src/test/java/org/jsoup/select/ElementsTest.java",
"chars": 24685,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.TextUtil;\nimport org.jsoup.nodes.Comment;\nimport org"
},
{
"path": "src/test/java/org/jsoup/select/EvaluatorDebug.java",
"chars": 2662,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.internal.StringUtil;\nimport org.jsoup.nodes.Document;\nimport org.jsoup.nodes"
},
{
"path": "src/test/java/org/jsoup/select/EvaluatorTest.java",
"chars": 11507,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.helper.Regex;\nimport org.jsoup.nodes.Document;\nimpor"
},
{
"path": "src/test/java/org/jsoup/select/NodesTest.java",
"chars": 1291,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.nodes.Document;\nimport org.jsoup.nodes.TextNode;\nimp"
},
{
"path": "src/test/java/org/jsoup/select/QueryParserTest.java",
"chars": 10250,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.nodes.Document;\nimport org.jsoup.nodes.Element;\nimpo"
},
{
"path": "src/test/java/org/jsoup/select/SelectorIT.java",
"chars": 1889,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.nodes.Document;\nimport org.jsoup.parser.Parser;\nimpo"
},
{
"path": "src/test/java/org/jsoup/select/SelectorTest.java",
"chars": 71170,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.MultiLocaleExtension.MultiLocaleTest;\nimport org.jso"
},
{
"path": "src/test/java/org/jsoup/select/StructuralEvaluatorTest.java",
"chars": 3793,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.nodes.Document;\nimport org.junit.jupiter.params.Para"
},
{
"path": "src/test/java/org/jsoup/select/TraversorTest.java",
"chars": 23864,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.TextUtil;\nimport org.jsoup.nodes.Document;\nimport or"
},
{
"path": "src/test/java/org/jsoup/select/XpathTest.java",
"chars": 10687,
"preview": "package org.jsoup.select;\n\nimport org.jsoup.Jsoup;\nimport org.jsoup.nodes.Document;\nimport org.jsoup.nodes.Element;\nimpo"
},
{
"path": "src/test/java11/org/jsoup/helper/HttpClientExecutorTest.java",
"chars": 5852,
"preview": "package org.jsoup.helper;\n\nimport org.jsoup.internal.SharedConstants;\nimport org.junit.jupiter.api.Test;\n\nimport java.io"
},
{
"path": "src/test/java11/org/jsoup/helper/HttpClientTestAccess.java",
"chars": 2676,
"preview": "package org.jsoup.helper;\n\nimport java.lang.reflect.Constructor;\nimport java.lang.reflect.Field;\nimport java.net.Proxy;\n"
},
{
"path": "src/test/java11/org/jsoup/integration/HttpClientConnectIT.java",
"chars": 902,
"preview": "package org.jsoup.integration;\n\nimport org.jsoup.helper.HttpClientExecutorTest;\nimport org.junit.jupiter.api.AfterAll;\ni"
},
{
"path": "src/test/java11/org/jsoup/integration/HttpClientConnectTest.java",
"chars": 431,
"preview": "package org.jsoup.integration;\n\nimport org.jsoup.helper.HttpClientExecutorTest;\nimport org.junit.jupiter.api.AfterAll;\ni"
},
{
"path": "src/test/java11/org/jsoup/integration/HttpClientSessionIT.java",
"chars": 426,
"preview": "package org.jsoup.integration;\n\nimport org.jsoup.helper.HttpClientExecutorTest;\nimport org.junit.jupiter.api.AfterAll;\ni"
},
{
"path": "src/test/java11/org/jsoup/integration/HttpClientSessionTest.java",
"chars": 430,
"preview": "package org.jsoup.integration;\n\nimport org.jsoup.helper.HttpClientExecutorTest;\nimport org.junit.jupiter.api.AfterAll;\ni"
},
{
"path": "src/test/resources/bomtests/bom_utf8.html",
"chars": 234,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE html>\n<html>\n<head>\n <title>OK</title>\n</head>\n<body>\nThere is a UTF8"
},
{
"path": "src/test/resources/fuzztests/ex-inselect16.html",
"chars": 734,
"preview": "<template><<tr><sA><template>b<b>><table><t><a><b><d><ii><i><dl><a>*</b></templatE></head><opTion></ousemap<opthon></opt"
}
]
// ... and 37 more files (download for full content)
About this extraction
This page contains the full source code of the jhy/jsoup GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 237 files (2.4 MB), approximately 650.7k tokens, and a symbol index with 4175 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.