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>
15 lines
409 B
HTML
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> |