Class EtlPipelineXmlSourceExtensions
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
pipelineEtlPipelineThe pipeline seed from Wolfgang.Etl.Abstractions.EtlPipeline.Create().
streamsIEnumerable<Stream>The streams to read, one XML document each.
Returns
- IEtlPipeline<T>
An Wolfgang.Etl.Abstractions.IEtlPipeline<T> for chaining.
Type Parameters
TThe record type to deserialize.
Exceptions
- ArgumentNullException
pipelineorstreamsis 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
pipelineEtlPipelineThe pipeline seed from Wolfgang.Etl.Abstractions.EtlPipeline.Create().
streamStreamThe stream to read the XML document from.
optionsXmlSingleStreamExtractorOptionsOptional extractor options. When null, defaults are used.
Returns
- IEtlPipeline<T>
An Wolfgang.Etl.Abstractions.IEtlPipeline<T> for chaining.
Type Parameters
TThe record type to deserialize.
Exceptions
- ArgumentNullException
pipelineorstreamis 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
pipelineEtlPipelineThe pipeline seed from Wolfgang.Etl.Abstractions.EtlPipeline.Create().
pathstringThe path of the XML file to read.
Returns
- IEtlPipeline<T>
An Wolfgang.Etl.Abstractions.IEtlPipeline<T> for chaining.
Type Parameters
TThe record type to deserialize.
Exceptions
- ArgumentNullException
pipelineorpathis null.