简体   繁体   中英

Flat file to XML Unit Test > How do I process remaining nodes if one fails within the flat file

I am wondering if within biztalk there is a way of processing xml from a flat file with incorrect nodes within the flat file. for example,

Row 1 and 2 are correct, they will proceed to disassemble to xml. Row 3 however is invalid. this is not transformed. Row 4 and onwards then is ignored by the pipeline and row 1 and 2 are processed into a valid xml document.

I have tried using Recoverable Interchange Processing however I believe this is only for multi part messages.

Is there a way to process the rest of the flat file even though somewhere there's a chance the flat file has a row what doesn't conform to the schema?

No, the Flat File Pipeline Component will always fail after the first error. The XmlValidator Pipeline Component fails the same way.

However you could write your own Flat File Pipeline Component that would continue to parse and find further errors.

This has been done with the XMLValidator , but I've never come across anyone that has done this particular feature with the Flat File Pipeline Component, probably because with a flat file structure, some failures would just cause further parsing to be useless as it would not know what structure it should try parsing next eg a missing row delimiter.

There are various examples of Extending the Flat File Component for other features however.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM