Class XmlSource<TOutput>

Reads data from a xml source. This can be any http resource or a file. By default, data is pulled via httpclient. Use the ResourceType property to read data from a file.

Inherited Members
Namespace: ETLBox.Xml
Assembly: ETLBox.Xml.dll
Syntax
    public class XmlSource<TOutput> : DataFlowStreamSource<TOutput>, IDataFlowLogging, IDataFlowStreamSource<TOutput>, IDataFlowExecutableSource<TOutput>, IDataFlowSource<TOutput>, IDataFlowStreamSource, IDataFlowExecutableSource, IDataFlowSource, IDataFlowComponent, ILoggableTask
Type Parameters
NameDescription
TOutput
Examples
XmlSource<POCO> source = new XmlSource<POCO>("https://test.com");

Constructors

XmlSource()

Declaration
    public XmlSource()

XmlSource(string)

Declaration
    public XmlSource(string uri)
Parameters
TypeNameDescription
stringuri

The source xml file name or uri

XmlSource(string, ResourceType)

Declaration
    public XmlSource(string uri, ResourceType resourceType)
Parameters
TypeNameDescription
stringuri

The source xml file name or uri

ResourceTyperesourceType

Specifies if data is loaded from a file, a web endpoint or other storage types (e.g. Azure Blob Storage)

Properties

AttributePrefixForDynamic

Declaration
    public string AttributePrefixForDynamic { get; set; }
Property Value
TypeDescription
string

CollectUnparsedData

If set to true, the source will collect all xml data that is not parsed during the process and store it in the UnparsedData property. Default is false.

Declaration
    public override bool CollectUnparsedData { get; set; }
Property Value
TypeDescription
bool
Overrides

ElementName

The element name of the document that contains an item of the data to be parsed

Declaration
    public string ElementName { get; set; }
Property Value
TypeDescription
string

Namespace

Optional: The namespace of the element which name is specified in ElementName

Declaration
    public string Namespace { get; set; }
Property Value
TypeDescription
string

RetrieveElementFunc

Instead of deifning

Declaration
    public Func<StreamMetaData, bool> RetrieveElementFunc { get; set; }
Property Value
TypeDescription
Func<StreamMetaData, bool>

TextPrefixForDynamic

Declaration
    public string TextPrefixForDynamic { get; set; }
Property Value
TypeDescription
string

XmlReaderSettings

The XmlReaderSettings used when creating the XmlReader. Please see XmlReaderSettings for more details.

Declaration
    public XmlReaderSettings XmlReaderSettings { get; set; }
Property Value
TypeDescription
XmlReaderSettings

XmlSerializer

The XmlSerializer used to deserialize the xml into the used data type.

Declaration
    public XmlSerializer XmlSerializer { get; set; }
Property Value
TypeDescription
XmlSerializer

Methods

CheckParameter()

Declaration
    protected override void CheckParameter()
Overrides

CloseReader()

Declaration
    protected override void CloseReader()
Overrides

InitReader()

Declaration
    protected override void InitReader()
Overrides

ReadAllRecords()

Declaration
    protected override void ReadAllRecords()
Overrides

Implements