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
object
DataFlowSource<TOutput>
DataFlowExecutableSource<TOutput>
DataFlowStreamSource<TOutput>
XmlSource<TOutput>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: ETLBox.Xml
Assembly: ETLBox.Xml.dll
Syntax
public class XmlSource<TOutput> : DataFlowStreamSource<TOutput>, ILoggableTask, IDataFlowLogging, IDataFlowStreamSource<TOutput>, IDataFlowExecutableSource<TOutput>, IDataFlowSource<TOutput>, IDataFlowStreamSource, IDataFlowExecutableSource, IDataFlowSource, IDataFlowComponent
Type Parameters
Name | Description |
---|---|
TOutput |
Examples
XmlSource<POCO> source = new XmlSource<POCO>("https://test.com");
Constructors
XmlSource()
Declaration
public XmlSource()
Examples
XmlSource<POCO> source = new XmlSource<POCO>("https://test.com");
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) |
XmlSource(string)
Declaration
public XmlSource(string uri)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The source xml file name or uri |
Properties
AttributePrefixForDynamic
Declaration
public string AttributePrefixForDynamic { get; set; }
Property Value
Type | Description |
---|---|
string |
Examples
XmlSource<POCO> source = new XmlSource<POCO>("https://test.com");
CollectUnparsedData
Declaration
public override bool CollectUnparsedData { get; set; }
Property Value
Type | Description |
---|---|
bool |
Overrides
ETLBox.DataFlow.DataFlowStreamSource<TOutput>.CollectUnparsedData
Examples
XmlSource<POCO> source = new XmlSource<POCO>("https://test.com");
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 |
ElementNameRetrievalFunc
Declaration
public Func<StreamMetaData, string> ElementNameRetrievalFunc { get; set; }
Property Value
Type | Description |
---|---|
System.Func<T, TResult><StreamMetaData, string> |
Examples
XmlSource<POCO> source = new XmlSource<POCO>("https://test.com");
TaskName
A name to identify the task or component. Every component or task comes with a default name that can be overwritten.
Declaration
public override string TaskName { get; set; }
Property Value
Type | Description |
---|---|
string |
Overrides
TextPrefixForDynamic
Declaration
public string TextPrefixForDynamic { get; set; }
Property Value
Type | Description |
---|---|
string |
Examples
XmlSource<POCO> source = new XmlSource<POCO>("https://test.com");
XmlReaderSettings
The XmlReaderSettings used when creating the XmlReader. Please see System.Xml.XmlReaderSettings for more details.
Declaration
public XmlReaderSettings XmlReaderSettings { get; set; }
Property Value
Type | Description |
---|---|
System.Xml.XmlReaderSettings |
XmlSerializer
The XmlSerializer used to deserialize the xml into the used data type.
Declaration
public XmlSerializer XmlSerializer { get; set; }
Property Value
Type | Description |
---|---|
System.Xml.Serialization.XmlSerializer |
Methods
CheckParameter()
Declaration
protected override void CheckParameter()
Overrides
ETLBox.DataFlow.DataFlowStreamSource<TOutput>.CheckParameter()
Examples
XmlSource<POCO> source = new XmlSource<POCO>("https://test.com");
CloseReader()
Declaration
protected override void CloseReader()
Overrides
ETLBox.DataFlow.DataFlowStreamSource<TOutput>.CloseReader()
Examples
XmlSource<POCO> source = new XmlSource<POCO>("https://test.com");
InitReader()
Declaration
protected override void InitReader()
Overrides
ETLBox.DataFlow.DataFlowStreamSource<TOutput>.InitReader()
Examples
XmlSource<POCO> source = new XmlSource<POCO>("https://test.com");
ReadAllRecords()
Declaration
protected override void ReadAllRecords()
Overrides
ETLBox.DataFlow.DataFlowStreamSource<TOutput>.ReadAllRecords()
Examples
XmlSource<POCO> source = new XmlSource<POCO>("https://test.com");