XmlSchemaValidation<TInput>
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..
Implements
Inherited Members
Namespace: ETLBox.Xml
Assembly: ETLBox.Xml.dll
Syntax
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
XmlSchemaValidation(string, Func<TInput, string>)
Declaration
Parameters
Type | Name | Description |
---|---|---|
string | xmlSchema | |
Func<TInput, string> | xmlSelector |
Properties
SourceBlock
SourceBlock from the underlying TPL.Dataflow which is used as output buffer for the component.
Declaration
Property Value
Type | Description |
---|---|
ISourceBlock<TInput> |
Overrides
TargetBlock
TargetBlock from the underlying TPL.Dataflow which is used as input buffer for the component.
Declaration
Property Value
Type | Description |
---|---|
ITargetBlock<TInput> |
Overrides
XmlSchema
The xml schema that is used for verfication
Declaration
Property Value
Type | Description |
---|---|
string |
XmlSelector
The selector on the object that returns the xml that needs to be verified
Declaration
Property Value
Type | Description |
---|---|
Func<TInput, string> |
Methods
CheckParameter()
Declaration
Overrides
CleanUpOnFaulted(Exception)
Declaration
Parameters
Type | Name | Description |
---|---|---|
Exception | e |
Overrides
CleanUpOnSuccess()
Declaration
Overrides
InitComponent()
Declaration
Overrides
LinkErrorTo(IDataFlowDestination<ETLBoxError>)
If an error occurs in the component, by default the component will throw an exception and stop execution. If you use the error linking, any erroneous records will be caught and redirected.
Declaration
Parameters
Type | Name | Description |
---|---|---|
IDataFlowDestination<ETLBoxError> | target | The target for erroneous rows. |
Returns
Type | Description |
---|---|
IDataFlowSource<ETLBoxError> | The linked component. |