Commit Graph

2 Commits

Author SHA1 Message Date
gongzhongqiang
f167fd8b3c fix: Update testNonExistingUrl to testNonExistingHtmlResource, use not exist classpath resource
Signed-off-by: gongzhongqiang <gongzhongqiang@apache.org>
2025-03-19 15:43:59 +00:00
Alexandros Pappas
82b46d2182 feat: add JSoup HTML document reader
This commit introduces the `JsoupDocumentReader` and `JsoupDocumentReaderConfig` classes, which provide functionality to read and parse HTML documents using the JSoup library.

The reader supports:
- Extracting text from specific HTML elements using CSS selectors.
- Extracting all text from the body of the document.
- Grouping text by element.
- Extracting metadata, including the document title, meta tags, and link URLs.
- Reading from various resource types (files, URLs, byte arrays).
- Configurable character encoding, selector, separator, and metadata extraction.

This new reader enhances Spring AI's ability to process web content and other HTML-based data sources.

Signed-off-by: Alexandros Pappas <apappascs@gmail.com>
2025-03-10 11:34:25 +00:00