Search code examples
xmlbiztalkpipelineflat-filedisassembly

Can I use the XML Validator Pipeline Component in BizTalk to validate Flat Files?


This is more of an academic question than a practical one, but I'm trying to gain a more in-depth knowledge of BizTalk.

In this scenario I'm getting a FlatFile with a head line and then repeated entries. The consensus seems to be that in order to make this work correctly I should have seperate head and body schemas, and use these as part of the disassembler portion of the Pipeline Component that I'm building.

Now, on the FF disassembler, there's a property "Validate Document Structure" that defaults to false. This Link seems to say that it will validate the header and body (not necessarily an issue). However, it also hints that I can use an XML validation component in my pipeline to do the same thing.

My question is twofold: First, is it possible to use an XML validator for these flatfiles after they're disassembled? Has the FF information already been converted to XML in the disassembler?

Secondly, why would I want to use the XML validator even if it's possible? Perhaps for if I discard the header line and don't want to risk validation errors from variant header lines?


Solution

  • To answer the specific questions:

    1. Yes.
    2. Yes, if there is a Flat File Disassembler in the Disassemble Stage.
    3. You generally would not.
    4. Not really. The Flat File Disassembler is very specific anyway so any malformed structure would likely have already caused an error.

    I don't recall ever using the XmlValidator in the same Pipeline as a Flat File Disassembler.