Class XmlSchemaValidation<TInput>
Validate XML code in your incoming data against a XML schema definition. You need to define how the XML string can be read from your data row and the schema definition. Rows with a schema that is not valid are send to the error output..
Inheritance
System.Object
DataFlowSource<TInput>
DataFlowTransformation<TInput, TInput>
XmlSchemaValidation<TInput>
Implements
IDataFlowTransformation<TInput, TInput>
IDataFlowSource<TInput>
IDataFlowDestination<TInput>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ETLBox.DataFlow.Transformations
Assembly: ETLBox.Xml.dll
Syntax
public class XmlSchemaValidation<TInput> : DataFlowTransformation<TInput, TInput>, ILoggableTask, IDataFlowLogging, IDataFlowTransformation<TInput, TInput>, IDataFlowSource<TInput>, IDataFlowSource, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent
Type Parameters
Name | Description |
---|---|
TInput | Type of input data. |
Examples
XmlSchemaValidation<MyXmlRow> schemaValidation = new XmlSchemaValidation<MyXmlRow>();
schemaValidation.XmlSelector = row => row.Xml;
schemaValidation.XmlSchema = xsdMarkup;
source.LinkTo(schemaValidation);
schemaValidation.LinkTo(dest);
schemaValidation.LinkErrorTo(error);
Constructors
XmlSchemaValidation()
Declaration
public XmlSchemaValidation()
XmlSchemaValidation(String, Func<TInput, String>)
Declaration
public XmlSchemaValidation(string xmlSchema, Func<TInput, string> xmlSelector)
Parameters
Type | Name | Description |
---|---|---|
System.String | xmlSchema | |
System.Func<TInput, System.String> | xmlSelector |
Properties
SourceBlock
SourceBlock from the underlying TPL.Dataflow which is used as output buffer for the component.
Declaration
public override ISourceBlock<TInput> SourceBlock { get; }
Property Value
Type | Description |
---|---|
System.Threading.Tasks.Dataflow.ISourceBlock<TInput> |
Overrides
ETLBox.DataFlow.DataFlowSource<TInput>.SourceBlock
TargetBlock
TargetBlock from the underlying TPL.Dataflow which is used as input buffer for the component.
Declaration
public override ITargetBlock<TInput> TargetBlock { get; }
Property Value
Type | Description |
---|---|
System.Threading.Tasks.Dataflow.ITargetBlock<TInput> |
Overrides
ETLBox.DataFlow.DataFlowTransformation<TInput, TInput>.TargetBlock
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 |
---|---|
System.String |
Overrides
XmlSchema
The xml schema that is used for verfication
Declaration
public string XmlSchema { get; set; }
Property Value
Type | Description |
---|---|
System.String |
XmlSelector
The selector on the object that returns the xml that needs to be verified
Declaration
public Func<TInput, string> XmlSelector { get; set; }
Property Value
Type | Description |
---|---|
System.Func<TInput, System.String> |
Methods
CheckParameter()
Declaration
protected override void CheckParameter()
Overrides
CleanUpOnFaulted(Exception)
Declaration
protected override void CleanUpOnFaulted(Exception e)
Parameters
Type | Name | Description |
---|---|---|
System.Exception | e |
Overrides
CleanUpOnSuccess()
Declaration
protected override void CleanUpOnSuccess()
Overrides
InitComponent()
Declaration
protected override void InitComponent()
Overrides
LinkErrorTo(IDataFlowDestination<ETLBoxError>)
Declaration
public override IDataFlowSource<ETLBoxError> LinkErrorTo(IDataFlowDestination<ETLBoxError> target)
Parameters
Type | Name | Description |
---|---|---|
IDataFlowDestination<ETLBoxError> | target |
Returns
Type | Description |
---|---|
IDataFlowSource<ETLBoxError> |
Overrides
ETLBox.DataFlow.DataFlowSource<TInput>.LinkErrorTo(ETLBox.DataFlow.IDataFlowDestination<ETLBox.DataFlow.ETLBoxError>)