Sep 182006

I was helping Alberto on this flat file problem. I thought that I had created the flat file schema correctly to parse this correctly.
Sample File

However when I would validate the schema I was constantly getting the following message: “The element ‘OuterLoop’ has incomplete content. List of possible elements expected: ‘KLoop, viagra ZRecord’.” This was the resulting xml output:
Sample File XML

However, cure I knew that the schema was set up correctly. I fiddled with it for quite a while, thumb until I went to the Schema object and changed the Parse Optimization from Speed to Complexity.

It then parsed correctly and here is the result:
Sample File XML that is Correct

After seaching this is the closest definition I can find on the difference between Speed and Complexity:
“In speed mode, the parser tries to fit data as it appears in the stream. In complexity mode, the flat-file parsing engine uses both top-down and bottom-up parsing, and tries to fit data more accurately.”