Hi, I Have a Flatfile that looks like this: 11 data // Starts This record appears once in the top of the file The below body lines will appear 1-many times 20 data 0-* 21 data 0-* 30 data 1-* 40 data 0-* 99 data ends // Appeare at the end of the file I made an XSD that works were the body is put under a record. the problem is the line with teh tag identifier 30 that is required. Tried to use Choice but then it do not detect if the line 30 is missing. If I use Sequence I can not parse the file if i.e. line 20 is missing. Any suggestions?
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}} \viewkind4\uc1\pard\f0\fs20 Try structuring your schema as follows: \par \par <Root> \par <Record11> maxOccurs=1 \par ... \par <Body> sequence \par <Record20> minOccurs=0 maxOccurs=unbounded \par ... \par <Record21> minOccurs=0 maxOccurs=unbounded \par ... \par <Record30> minOccurs=1 maxOccurs=unbounded \par ... \par <Record40> minOccurs=0 maxOccurs=unbounded \par ... \par <Record99> maxOccurs=1 \par \par \par Also make sure you set the look_ahead_depth to 0, and the parser_optimization to "complexity". These are properties on the <Schema> node. \par \par -- \par Dave \par \par This posting is provided "AS IS" with no warranties, and confers no rights. \par }