none
Flatfile schema with nested repeating optional records RRS feed

  • Question

  • Hello,

    I am trying to generate a flatfile schema for following dataset - 

    H;X;02;
    O;99;Supervisor;
    O;99;Supervisor1;
    B;2402;A1;
    B;2402;B1;
    L;4262800002;42628000001;
    L;4262800002;426280000011;
    X;02;426226641185;911000065153;
    n;1000.00;1000.00;
    n;1000.00;2000.00;
    c;.25;7.50;
    c;.25;7.50;
    d;;100;
    d;;100;
    d;;100;
    X;02;426226641185;9110000651531;
    c;.25;7.501;
    d;;1001;
    T;1;53;

    I want the data in following format - 

    <Header>
    <H>
    <Field1></Field1>
    <Field2></Field2>
    </H>
    <O> (can be multiple)
    <Field1></Field1>
    <Field2></Field2>
    </O>
    <B> (can be multiple)
    <Field1></Field1>
    <Field2></Field2>
    </B>
    <L> (can be multiple)
    <Field1></Field1>
    <Field2></Field2>
    </L>
    <XLoop> (can be multiple)
    <Xdata>
    <Field1></Field1>
    <Field2></Field2>
    <Field3></Field3>
    </Xdata>
    <n> (can be multiple)
    <Field1></Field1>
    <Field2></Field2>
    </n>
    <c> (can be multiple)
    <Field1></Field1>
    <Field2></Field2>
    </c>
    <d> (can be multiple)
    <Field1></Field1>
    <Field2></Field2>
    </d>
    </XLoop>
    </Header>

    Note: that the last record (starting with T) is of no importance - hence its not mandatory to read - but nice to read this as well.

    The main requirement is that the X set of records can be multiple and can contain multiple n, c or d. I have created a schema which works fine with all n, c and d. But the moment I remove a n record and only keep c and d - then the rest of the data after X is not read.

    Here is my flatfile schema which I have created so far - if you try to validate the instance against this schema you will notice that for the second X loop the c and d records are not considered in the validate instance.

    <?xml version="1.0" encoding="utf-16"?>
    <xs:schema xmlns="http://SomeNamespace" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://SomeNamespace" xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:annotation>
        <xs:appinfo>
          <b:schemaInfo standard="Flat File" root_reference="Header" default_pad_char=" " pad_char_type="char" count_positions_by_byte="false" parser_optimization="speed" lookahead_depth="3" suppress_empty_nodes="false" generate_empty_nodes="true" allow_early_termination="false" early_terminate_optional_fields="false" allow_message_breakup_of_infix_root="false" compile_parse_tables="false" />
          <schemaEditorExtension:schemaInfo namespaceAlias="b" extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension" standardName="Flat File" xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" />
        </xs:appinfo>
      </xs:annotation>
      <xs:element name="Header">
        <xs:annotation>
          <xs:appinfo>
            <b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" sequence_number="1" child_delimiter_type="hex" child_order="postfix" child_delimiter="0x3B 0xD 0xA" />
          </xs:appinfo>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:annotation>
              <xs:appinfo>
                <b:groupInfo sequence_number="0" />
              </xs:appinfo>
            </xs:annotation>
            <xs:element name="H">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" sequence_number="1" child_order="prefix" child_delimiter_type="char" child_delimiter=";" tag_name="H" />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:annotation>
                    <xs:appinfo>
                      <b:groupInfo sequence_number="0" />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element name="Field1" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo sequence_number="1" justification="left" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Field2" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo sequence_number="2" justification="left" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element maxOccurs="unbounded" name="O">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo sequence_number="2" structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" child_delimiter_type="char" child_order="prefix" child_delimiter=";" tag_name="O" />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:annotation>
                    <xs:appinfo>
                      <b:groupInfo sequence_number="0" />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element name="Field1" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo sequence_number="1" justification="left" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Field2" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo sequence_number="2" justification="left" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element maxOccurs="unbounded" name="B">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo sequence_number="3" structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" child_order="prefix" child_delimiter_type="char" child_delimiter=";" tag_name="B" />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:annotation>
                    <xs:appinfo>
                      <b:groupInfo sequence_number="0" />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element name="Field1" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo sequence_number="1" justification="left" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Field2" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo sequence_number="2" justification="left" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element maxOccurs="unbounded" name="L">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo sequence_number="4" structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" child_order="prefix" child_delimiter_type="char" child_delimiter=";" tag_name="L" />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:annotation>
                    <xs:appinfo>
                      <b:groupInfo sequence_number="0" />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element name="Field1" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo sequence_number="1" justification="left" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Field2" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo sequence_number="2" justification="left" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element maxOccurs="unbounded" name="XLoop">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo sequence_number="5" structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" child_delimiter_type="hex" child_delimiter="0x3B 0xD 0xA" />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:annotation>
                    <xs:appinfo>
                      <b:groupInfo sequence_number="0" />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element minOccurs="0" name="Xdata">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:recordInfo sequence_number="1" structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" child_delimiter_type="char" child_delimiter=";" child_order="prefix" tag_name="X" />
                      </xs:appinfo>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:annotation>
                          <xs:appinfo>
                            <b:groupInfo sequence_number="0" />
                          </xs:appinfo>
                        </xs:annotation>
                        <xs:element name="Field1" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo sequence_number="1" justification="left" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element name="Field2" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo sequence_number="2" justification="left" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element name="Field3" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo sequence_number="3" justification="left" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="unbounded" name="n" nillable="true">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" child_delimiter_type="char" child_delimiter=";" child_order="prefix" tag_name="n" sequence_number="2" />
                      </xs:appinfo>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:annotation>
                          <xs:appinfo>
                            <b:groupInfo sequence_number="0" />
                          </xs:appinfo>
                        </xs:annotation>
                        <xs:element name="Field1" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo sequence_number="1" justification="left" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element name="Field2" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo sequence_number="2" justification="left" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="unbounded" name="c">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" child_delimiter_type="char" child_delimiter=";" child_order="prefix" tag_name="c" sequence_number="3" />
                      </xs:appinfo>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:annotation>
                          <xs:appinfo>
                            <b:groupInfo sequence_number="0" />
                          </xs:appinfo>
                        </xs:annotation>
                        <xs:element name="Field1" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo sequence_number="1" justification="left" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element name="Field2" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo sequence_number="2" justification="left" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="unbounded" name="d">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" child_delimiter_type="char" child_delimiter=";" child_order="prefix" tag_name="d" sequence_number="4" />
                      </xs:appinfo>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:annotation>
                          <xs:appinfo>
                            <b:groupInfo sequence_number="0" />
                          </xs:appinfo>
                        </xs:annotation>
                        <xs:element name="Field1" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo sequence_number="1" justification="left" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element name="Field2" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo sequence_number="2" justification="left" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>

    Please help. Many thanks in advance.

    Friday, May 5, 2017 8:13 AM

Answers

  • Hi,

    Not complete, but use the following as inspiration.

    Best regards

    Rasmus

    <?xml version="1.0" encoding="utf-16"?>
    <xs:schema xmlns="http://SomeNamespace" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://SomeNamespace" xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:annotation>
        <xs:appinfo>
          <schemaEditorExtension:schemaInfo namespaceAlias="b" extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension" standardName="Flat File" xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" />
          <b:schemaInfo standard="Flat File" codepage="65001" default_pad_char=" " pad_char_type="char" count_positions_by_byte="false" parser_optimization="complexity" lookahead_depth="3" suppress_empty_nodes="false" generate_empty_nodes="true" allow_early_termination="false" early_terminate_optional_fields="false" allow_message_breakup_of_infix_root="false" compile_parse_tables="false" root_reference="Header" />
        </xs:appinfo>
      </xs:annotation>
      <xs:element name="Header">
        <xs:annotation>
          <xs:appinfo>
            <b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0xD 0xA" child_order="infix" sequence_number="1" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
          </xs:appinfo>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:annotation>
              <xs:appinfo>
                <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
              </xs:appinfo>
            </xs:annotation>
            <xs:element name="Header">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo tag_name="H" structure="delimited" child_delimiter_type="char" child_delimiter=";" child_order="prefix" sequence_number="1" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:annotation>
                    <xs:appinfo>
                      <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element minOccurs="0" maxOccurs="1" name="Header_Child1" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="1" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="1" name="Header_Child2" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="2" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="1" name="Header_Child3" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="3" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="O">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo tag_name="O" structure="delimited" child_delimiter_type="char" child_delimiter=";" child_order="prefix" sequence_number="2" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:annotation>
                    <xs:appinfo>
                      <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element minOccurs="0" maxOccurs="1" name="o_Child1" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="1" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="1" name="o_Child2" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="2" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="1" name="o_Child3" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="3" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="B">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo tag_name="B" structure="delimited" child_delimiter_type="char" child_delimiter=";" child_order="prefix" sequence_number="3" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:annotation>
                    <xs:appinfo>
                      <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element minOccurs="0" maxOccurs="1" name="b_Child1" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="1" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="1" name="b_Child2" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="2" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="1" name="b_Child3" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="3" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="l">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo tag_name="L" structure="delimited" child_delimiter_type="char" child_delimiter=";" child_order="prefix" sequence_number="4" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:annotation>
                    <xs:appinfo>
                      <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element minOccurs="0" maxOccurs="1" name="l_Child1" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="1" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="1" name="l_Child2" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="2" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="1" name="l_Child3" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="3" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="XLoop">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0xD 0xA" child_order="infix" sequence_number="5" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" tag_name="X" />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:annotation>
                    <xs:appinfo>
                      <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element minOccurs="0" maxOccurs="unbounded" name="XData">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter=";" child_order="postfix" sequence_number="1" preserve_delimiter_for_empty_data="false" suppress_trailing_delimiters="false" />
                      </xs:appinfo>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:annotation>
                          <xs:appinfo>
                            <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                          </xs:appinfo>
                        </xs:annotation>
                        <xs:element minOccurs="0" name="x_Child1_Child1" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <fieldInfo justification="left" sequence_number="1" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element minOccurs="0" maxOccurs="1" name="x_Child1_Child2" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="2" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element minOccurs="0" maxOccurs="1" name="x_Child1_Child3" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="3" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element minOccurs="0" maxOccurs="1" name="x_Child1_Child4" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="4" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="unbounded" name="N">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:recordInfo tag_name="n" structure="delimited" child_delimiter_type="char" child_delimiter=";" child_order="prefix" sequence_number="2" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
                      </xs:appinfo>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:annotation>
                          <xs:appinfo>
                            <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                          </xs:appinfo>
                        </xs:annotation>
                        <xs:element minOccurs="0" maxOccurs="1" name="N_Child1" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="1" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element minOccurs="0" maxOccurs="1" name="N_Child2" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="2" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element minOccurs="0" maxOccurs="1" name="N_Child3" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="3" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="unbounded" name="C">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:recordInfo tag_name="c" structure="delimited" child_delimiter_type="char" child_delimiter=";" child_order="prefix" sequence_number="3" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
                      </xs:appinfo>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:annotation>
                          <xs:appinfo>
                            <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                          </xs:appinfo>
                        </xs:annotation>
                        <xs:element minOccurs="0" maxOccurs="1" name="C_Child1" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="1" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element minOccurs="0" maxOccurs="1" name="C_Child2" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="2" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element minOccurs="0" maxOccurs="1" name="C_Child3" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="3" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="unbounded" name="D">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:recordInfo tag_name="d" structure="delimited" child_delimiter_type="char" child_delimiter=";" child_order="prefix" sequence_number="4" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
                      </xs:appinfo>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:annotation>
                          <xs:appinfo>
                            <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                          </xs:appinfo>
                        </xs:annotation>
                        <xs:element minOccurs="0" maxOccurs="1" name="D_Child1" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="1" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element minOccurs="0" maxOccurs="1" name="D_Child2" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="2" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element minOccurs="0" maxOccurs="1" name="D_Child3" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="3" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="T">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo tag_name="T" structure="delimited" child_delimiter_type="char" child_delimiter=";" child_order="prefix" sequence_number="6" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:annotation>
                    <xs:appinfo>
                      <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element minOccurs="0" maxOccurs="1" name="Header_Child19_Child1" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="1" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="1" name="Header_Child19_Child2" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="2" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="1" name="Header_Child19_Child3" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="3" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>

    Monday, May 8, 2017 7:51 AM

All replies

  • When defining XLoop in the Wizard, you select all child records and the entire set becomes a repeating group.

    This is actually very, very easy.  You may have to run the Wizard several times to get the structure right, but there's nothing wrong with that.

    Friday, May 5, 2017 2:53 PM
    Moderator
  • Hi John,

    Yes, the schema generation was indeed easy although I had to try several times with the wizard. The problem was actually with the optional nodes under X loop - although I made the min occurs as 0 - BizTalk instance validator was not considering it.

    I read through some other blog posts and then finally applied the "Parser Optimization" property of the flatfile schema to "Complexity" and now the optional records are getting considered properly.

    Thank you for looking into my query.


    Monday, May 8, 2017 6:49 AM
  • Hi,

    Not complete, but use the following as inspiration.

    Best regards

    Rasmus

    <?xml version="1.0" encoding="utf-16"?>
    <xs:schema xmlns="http://SomeNamespace" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://SomeNamespace" xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:annotation>
        <xs:appinfo>
          <schemaEditorExtension:schemaInfo namespaceAlias="b" extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension" standardName="Flat File" xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" />
          <b:schemaInfo standard="Flat File" codepage="65001" default_pad_char=" " pad_char_type="char" count_positions_by_byte="false" parser_optimization="complexity" lookahead_depth="3" suppress_empty_nodes="false" generate_empty_nodes="true" allow_early_termination="false" early_terminate_optional_fields="false" allow_message_breakup_of_infix_root="false" compile_parse_tables="false" root_reference="Header" />
        </xs:appinfo>
      </xs:annotation>
      <xs:element name="Header">
        <xs:annotation>
          <xs:appinfo>
            <b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0xD 0xA" child_order="infix" sequence_number="1" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
          </xs:appinfo>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:annotation>
              <xs:appinfo>
                <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
              </xs:appinfo>
            </xs:annotation>
            <xs:element name="Header">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo tag_name="H" structure="delimited" child_delimiter_type="char" child_delimiter=";" child_order="prefix" sequence_number="1" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:annotation>
                    <xs:appinfo>
                      <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element minOccurs="0" maxOccurs="1" name="Header_Child1" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="1" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="1" name="Header_Child2" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="2" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="1" name="Header_Child3" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="3" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="O">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo tag_name="O" structure="delimited" child_delimiter_type="char" child_delimiter=";" child_order="prefix" sequence_number="2" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:annotation>
                    <xs:appinfo>
                      <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element minOccurs="0" maxOccurs="1" name="o_Child1" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="1" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="1" name="o_Child2" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="2" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="1" name="o_Child3" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="3" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="B">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo tag_name="B" structure="delimited" child_delimiter_type="char" child_delimiter=";" child_order="prefix" sequence_number="3" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:annotation>
                    <xs:appinfo>
                      <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element minOccurs="0" maxOccurs="1" name="b_Child1" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="1" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="1" name="b_Child2" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="2" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="1" name="b_Child3" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="3" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="l">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo tag_name="L" structure="delimited" child_delimiter_type="char" child_delimiter=";" child_order="prefix" sequence_number="4" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:annotation>
                    <xs:appinfo>
                      <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element minOccurs="0" maxOccurs="1" name="l_Child1" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="1" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="1" name="l_Child2" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="2" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="1" name="l_Child3" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="3" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="XLoop">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0xD 0xA" child_order="infix" sequence_number="5" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" tag_name="X" />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:annotation>
                    <xs:appinfo>
                      <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element minOccurs="0" maxOccurs="unbounded" name="XData">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter=";" child_order="postfix" sequence_number="1" preserve_delimiter_for_empty_data="false" suppress_trailing_delimiters="false" />
                      </xs:appinfo>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:annotation>
                          <xs:appinfo>
                            <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                          </xs:appinfo>
                        </xs:annotation>
                        <xs:element minOccurs="0" name="x_Child1_Child1" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <fieldInfo justification="left" sequence_number="1" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element minOccurs="0" maxOccurs="1" name="x_Child1_Child2" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="2" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element minOccurs="0" maxOccurs="1" name="x_Child1_Child3" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="3" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element minOccurs="0" maxOccurs="1" name="x_Child1_Child4" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="4" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="unbounded" name="N">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:recordInfo tag_name="n" structure="delimited" child_delimiter_type="char" child_delimiter=";" child_order="prefix" sequence_number="2" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
                      </xs:appinfo>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:annotation>
                          <xs:appinfo>
                            <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                          </xs:appinfo>
                        </xs:annotation>
                        <xs:element minOccurs="0" maxOccurs="1" name="N_Child1" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="1" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element minOccurs="0" maxOccurs="1" name="N_Child2" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="2" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element minOccurs="0" maxOccurs="1" name="N_Child3" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="3" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="unbounded" name="C">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:recordInfo tag_name="c" structure="delimited" child_delimiter_type="char" child_delimiter=";" child_order="prefix" sequence_number="3" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
                      </xs:appinfo>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:annotation>
                          <xs:appinfo>
                            <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                          </xs:appinfo>
                        </xs:annotation>
                        <xs:element minOccurs="0" maxOccurs="1" name="C_Child1" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="1" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element minOccurs="0" maxOccurs="1" name="C_Child2" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="2" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element minOccurs="0" maxOccurs="1" name="C_Child3" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="3" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="unbounded" name="D">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:recordInfo tag_name="d" structure="delimited" child_delimiter_type="char" child_delimiter=";" child_order="prefix" sequence_number="4" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
                      </xs:appinfo>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:annotation>
                          <xs:appinfo>
                            <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                          </xs:appinfo>
                        </xs:annotation>
                        <xs:element minOccurs="0" maxOccurs="1" name="D_Child1" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="1" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element minOccurs="0" maxOccurs="1" name="D_Child2" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="2" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:element minOccurs="0" maxOccurs="1" name="D_Child3" type="xs:string">
                          <xs:annotation>
                            <xs:appinfo>
                              <b:fieldInfo justification="left" sequence_number="3" />
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="T">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo tag_name="T" structure="delimited" child_delimiter_type="char" child_delimiter=";" child_order="prefix" sequence_number="6" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:annotation>
                    <xs:appinfo>
                      <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element minOccurs="0" maxOccurs="1" name="Header_Child19_Child1" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="1" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="1" name="Header_Child19_Child2" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="2" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" maxOccurs="1" name="Header_Child19_Child3" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="3" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>

    Monday, May 8, 2017 7:51 AM
  • Thanks Rasmus, I have my schema built in a similar way now. The issue which I was facing was about the optional records and changing the "Parser Optimization" property of the flatfile schema to "Complexity".

    Thanks for your help.

    Tuesday, May 9, 2017 8:34 AM