Class HtmlSource<TOutput>
Reads one HTML resource, converts it to Markdown, and emits one Microsoft.Extensions.DataIngestion.IngestionDocument.
Inheritance
DataFlowSource<TOutput>
DataFlowExecutableSource<TOutput>
DataFlowStreamSource<TOutput>
HtmlSource<TOutput>
Inherited Members
Namespace: ETLBox.AI
Assembly: ETLBox.AI.Html.dll
Syntax
public class HtmlSource<TOutput> : DataFlowStreamSource<TOutput>, IDataFlowStreamSource<TOutput>, IDataFlowExecutableSource<TOutput>, IDataFlowStreamSource, IDataFlowExecutableSource, IDataFlowSource<TOutput>, IDataFlowSource, IDataFlowComponent, ILoggableTaskType Parameters
| Name | Description |
|---|---|
| TOutput | Type of outgoing data. |
Examples
var source = new HtmlSource("page.html");
var chunk = new ChunkTransformation {
DocumentPropertyName = "Document"
};
source.LinkTo(chunk);Constructors
HtmlSource()
Declaration
public HtmlSource()HtmlSource(string)
Declaration
public HtmlSource(string uri)Parameters
| Type | Name | Description |
|---|---|---|
| string | uri | The source of the file. This can be a filename or a web url.Uri |
HtmlSource(string, ResourceType)
Declaration
public HtmlSource(string uri, ResourceType resourceType)Parameters
| Type | Name | Description |
|---|---|---|
| string | uri | The source of the file. This can be a filename or a web url.Uri |
| ResourceType | resourceType | Specifies if data is loaded from a file, a web endpoint or other storage types (e.g. Azure Blob Storage) |
Properties
ConverterConfig
Configuration used by ReverseMarkdown to convert the HTML resource to Markdown.
Declaration
public Config ConverterConfig { get; set; }Property Value
| Type | Description |
|---|---|
| Config |
ResultSelector
Creates the outgoing element from the parsed document and the metadata of the current resource. When set, this function is used instead of the ExpandoObject default or the Microsoft.Extensions.DataIngestion.IngestionDocument default.
Declaration
public Func<IngestionDocument, StreamMetaData, TOutput> ResultSelector { get; set; }Property Value
| Type | Description |
|---|---|
| Func<IngestionDocument, StreamMetaData, TOutput> |
Methods
CloseReader()
Declaration
protected override void CloseReader()Overrides
InitReader()
Declaration
protected override void InitReader()Overrides
ReadAllRecords()
Declaration
protected override void ReadAllRecords()