In my attempts to process a particularly large xml file, I am using the XmlReader
to loop through the xml and LINQ to Xml to create XElements
for each chunk of the xml within the document.
On successfully parsing the data and validating it against it's schema, I write the data to a set of SSIS output buffers. If a schema error is found, I want to clear the data in output buffers for the file and abort processing.
I am using Outputbuffer.AddRow()
to add rows to my output buffers but I cannot see a method to remove rows which I have added to my buffers. Any thoughts would be appreciated.
There is no method to delete outputbuffer row, store rows in a datatable
or list(of )
, do the validation before adding , if it is true add a rows from list or datatable to the outputbuffer.
Or You can add a boolean column to the output buffer, if schema error found, set this column to True, and filter rows using a conditional split.
[boolColumn] == False