Files
spring-ai/document-readers/jsoup-reader/src/test/resources/test.html
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

15 lines
409 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>Test HTML</title>
<meta name="description" content="A test document for Spring AI">
<meta name="keywords" content="test,html,spring ai">
<meta name="custom1" content="value1">
<meta name="custom2" content="value2">
</head>
<body>
<h1>This is a test HTML document.</h1>
<p>Some paragraph text.</p>
<a href="https://spring.io/">Spring</a>
</body>
</html>