Class EtlPipelineXmlSourceExtensions

Namespace
Wolfgang.Etl.Xml
Assembly
Wolfgang.Etl.Xml.dll

Class-named XML source factories for the fluent Wolfgang.Etl.Abstractions.EtlPipeline chain. Each factory constructs the matching extractor and seeds the pipeline, enabling EtlPipeline.Create().XmlSingleStreamExtractor<Invoice>("invoices.xml").

public static class EtlPipelineXmlSourceExtensions
Inheritance
EtlPipelineXmlSourceExtensions
Inherited Members

Remarks

Path-based factories own the file stream they open and close it when extraction finishes, whether it completes or throws. Stream-based factories do not close the stream — the caller owns its lifetime (respecting LeaveOpen).

Methods

XmlMultiStreamExtractor<T>(EtlPipeline, IEnumerable<Stream>)

Starts a pipeline that reads one record per stream from a sequence of single-document XML streams. Each stream is closed by the extractor after its record is read.

public static IEtlPipeline<T> XmlMultiStreamExtractor<T>(this EtlPipeline pipeline, IEnumerable<Stream> streams) where T : notnull, new()

Parameters

pipeline EtlPipeline

The pipeline seed from Wolfgang.Etl.Abstractions.EtlPipeline.Create().

streams IEnumerable<Stream>

The streams to read, one XML document each.

Returns

IEtlPipeline<T>

An Wolfgang.Etl.Abstractions.IEtlPipeline<T> for chaining.

Type Parameters

T

The record type to deserialize.

Exceptions

ArgumentNullException

pipeline or streams is null.

XmlSingleStreamExtractor<T>(EtlPipeline, Stream, XmlSingleStreamExtractorOptions?)

Starts a pipeline that reads records from a single-root XML stream. The caller owns the stream.

public static IEtlPipeline<T> XmlSingleStreamExtractor<T>(this EtlPipeline pipeline, Stream stream, XmlSingleStreamExtractorOptions? options = null) where T : notnull, new()

Parameters

pipeline EtlPipeline

The pipeline seed from Wolfgang.Etl.Abstractions.EtlPipeline.Create().

stream Stream

The stream to read the XML document from.

options XmlSingleStreamExtractorOptions

Optional extractor options. When null, defaults are used.

Returns

IEtlPipeline<T>

An Wolfgang.Etl.Abstractions.IEtlPipeline<T> for chaining.

Type Parameters

T

The record type to deserialize.

Exceptions

ArgumentNullException

pipeline or stream is null.

XmlSingleStreamExtractor<T>(EtlPipeline, string)

Starts a pipeline that reads records from a single-root XML file. The factory owns the file stream and closes it when extraction finishes.

public static IEtlPipeline<T> XmlSingleStreamExtractor<T>(this EtlPipeline pipeline, string path) where T : notnull, new()

Parameters

pipeline EtlPipeline

The pipeline seed from Wolfgang.Etl.Abstractions.EtlPipeline.Create().

path string

The path of the XML file to read.

Returns

IEtlPipeline<T>

An Wolfgang.Etl.Abstractions.IEtlPipeline<T> for chaining.

Type Parameters

T

The record type to deserialize.

Exceptions

ArgumentNullException

pipeline or path is null.