XmlSource<TOutput>
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
Inherited Members
Namespace: ETLBox.Xml
Assembly: ETLBox.Xml.dll
Syntax
public class XmlSource<TOutput> : DataFlowStreamSource<TOutput>, IDataFlowStreamSource<TOutput>, IDataFlowExecutableSource<TOutput>, IDataFlowSource<TOutput>, IDataFlowStreamSource, IDataFlowExecutableSource, IDataFlowSource, IDataFlowComponent, ILoggableTask
Type Parameters
Name | Description |
---|---|
TOutput |
Examples
XmlSource<POCO> source = new XmlSource<POCO>("https://test.com");
Constructors
XmlSource()
Declaration
public XmlSource()
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
Type | Description |
---|---|
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
Type | Description |
---|---|
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
Type | Description |
---|---|
string |
Namespace
Optional: The namespace of the element which name is specified in ElementName
Declaration
public string Namespace { get; set; }
Property Value
Type | Description |
---|---|
string |
RetrieveElementFunc
Instead of deifning
Declaration
public Func<StreamMetaData, bool> RetrieveElementFunc { get; set; }
Property Value
Type | Description |
---|---|
Func<StreamMetaData, bool> |
TextPrefixForDynamic
Declaration
public string TextPrefixForDynamic { get; set; }
Property Value
Type | Description |
---|---|
string |
XmlReaderSettings
The XmlReaderSettings used when creating the XmlReader. Please see XmlReaderSettings for more details.
Declaration
public XmlReaderSettings XmlReaderSettings { get; set; }
Property Value
Type | Description |
---|---|
XmlReaderSettings |
XmlSerializer
The XmlSerializer used to deserialize the xml into the used data type.
Declaration
public XmlSerializer XmlSerializer { get; set; }
Property Value
Type | Description |
---|---|
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()