XmlDestination<TInput>

Class XmlDestination<TInput>

A Xml destination defines a xml file where data from the flow is inserted.

Inherited Members
Namespace: ETLBox.Xml
Assembly: ETLBox.Xml.dll
Syntax
    public class XmlDestination<TInput> : DataFlowStreamDestination<TInput>, IDataFlowStreamDestination<TInput>, IDataFlowDestination<TInput>, IDataFlowStreamDestination, IDataFlowDestination, IDataFlowComponent, ILoggableTask
Type Parameters
NameDescription
TInput

Type of ingoing data

Examples
XmlDestination<MyRow> dest = new XmlDestination<MyRow>("/path/to/file.json");
dest.Wait(); //Wait for all data to arrive

Constructors

XmlDestination()

Declaration
    public XmlDestination()

XmlDestination(string)

Declaration
    public XmlDestination(string uri)
Parameters
TypeNameDescription
stringuri

The destination xml file name or uri

XmlDestination(string, ResourceType)

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

The destination 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

DynamicElementName

Defines the XML element name used when writing ExpandoObject data. By default, elements are wrapped in a <Dynamic> tag.

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

HttpContentType

The content type used when sending the http request content.

Declaration
    public override string HttpContentType { get; set; }
Property Value
TypeDescription
string
Overrides

NS

Defines the XML namespaces used for serialization (not applicable for dynamic objects). By default, an empty namespace is added, meaning the generated XML will not include namespace declarations, which is often the desired behavior. To include namespaces, add entries to this property before serialization.

Declaration
    public XmlSerializerNamespaces NS { get; set; }
Property Value
TypeDescription
XmlSerializerNamespaces

RootElementName

The name of the root element in the XML output. Default is <Root>.

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

RootElementNamespace

The XML namespace associated with the root element. If set, the root element will include the specified namespace declaration.

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

RootElementPrefix

The XML prefix assigned to the root element's namespace. If a namespace is defined, this prefix is used for qualified names in the output.

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

Settings

The System.Xml.XmlWriterSettings for the XmlWriter.

Declaration
    public XmlWriterSettings Settings { get; set; }
Property Value
TypeDescription
XmlWriterSettings

ShouldConvertDynamicPropToAttribute

A predicate function that determines whether a dynamic property should be written as an XML attribute instead of an element.

Declaration
    public Predicate<XElement> ShouldConvertDynamicPropToAttribute { get; set; }
Property Value
TypeDescription
Predicate<XElement>

Methods

CheckParameter()

Declaration
    protected override void CheckParameter()
Overrides

CloseStream()

Declaration
    protected override void CloseStream()
Overrides

InitStream()

Declaration
    protected override void InitStream()
Overrides

SetDefaultNamespace(XElement, XNamespace)

Sets the default XML namespace of this System.Xml.Linq.XElement and all its descendants

Declaration
    public void SetDefaultNamespace(XElement element, XNamespace newXmlns)
Parameters
TypeNameDescription
XElementelement
XNamespacenewXmlns

WriteIntoStream(TInput)

Declaration
    protected override void WriteIntoStream(TInput data)
Parameters
TypeNameDescription
TInputdata
Overrides

Implements