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.
Inheritance
XmlSource<TOutput>
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
Examples
XmlSource<POCO> source = new XmlSource<POCO>("https://test.com");
Constructors
XmlSource()
Declaration
XmlSource(string)
Declaration
public XmlSource(string uri)
Parameters
Type | Name | Description |
---|
string | uri | The source xml file name or uri |
XmlSource(string, ResourceType)
Declaration
public XmlSource(string uri, ResourceType resourceType)
Parameters
Type | Name | Description |
---|
string | uri | The source xml file name or uri |
ResourceType | resourceType | 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
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
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
Namespace
Optional: The namespace of the element which name is specified in ElementName
Declaration
public string Namespace { get; set; }
Property Value
RetrieveElementFunc
Declaration
public Func<StreamMetaData, bool> RetrieveElementFunc { get; set; }
Property Value
TextPrefixForDynamic
Declaration
public string TextPrefixForDynamic { get; set; }
Property Value
XmlReaderSettings
The XmlReaderSettings used when creating the XmlReader.
Please see XmlReaderSettings for more details.
Declaration
public XmlReaderSettings XmlReaderSettings { get; set; }
Property Value
XmlSerializer
The XmlSerializer used to deserialize the xml into the used data type.
Declaration
public XmlSerializer XmlSerializer { get; set; }
Property Value
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