none
Problem building FlatFile schema from CSV RRS feed

  • Question

  • I am having an issue building a  FlatFile schema based on a VERY simple csv layout.

    The CSV layout is essentially:

    field1, field2, field3, field4 {CR}{LF}

    field1, field2, field3, field4 {CR}{LF}

     

    The schema is essentially:

    [ROOT]

    +   [field1]

    +   [field2]

    +   [field3]

    +   [field4]

    When I run the FlatFile thru the schema, the first line in the FlatFile fills in OK.

    But in [field4] it fills in the correct data item from line one then it fills in ALL of the data in the rest of the file (comma delimited) in that same field.

    Need help please. Thanks.

    Monday, September 12, 2011 2:40 PM

Answers

  • This is a common problem.  You have two sets of records which you need to describe, the line delimited, and then the comma delimited.

    Set your root node to have a child delimiter of CR/LF.  Then create two sub-records.  The first you need to set to comma delimiter and then populate all your CSV fields.

    The second you just need to put in a dummy field (as the last line is blank).


    If this is helpful or answers your question - please mark accordingly.
    Because I get points for it which gives my life purpose (also, it helps other people find answers quickly)
    Monday, September 12, 2011 2:49 PM

All replies

  • Try generating an instance from your flat file schema using the Native format. Then you can do compare with the test file.
    Cheers,
    Bali
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    Blog: http://dpsbali-biztalkweblog.blogspot.com
    -----------------------------------------------------
    Mark As Answer or Vote As Helpful if this helps.
    Monday, September 12, 2011 2:48 PM
  • This is a common problem.  You have two sets of records which you need to describe, the line delimited, and then the comma delimited.

    Set your root node to have a child delimiter of CR/LF.  Then create two sub-records.  The first you need to set to comma delimiter and then populate all your CSV fields.

    The second you just need to put in a dummy field (as the last line is blank).


    If this is helpful or answers your question - please mark accordingly.
    Because I get points for it which gives my life purpose (also, it helps other people find answers quickly)
    Monday, September 12, 2011 2:49 PM
  • This is a common problem.  You have two sets of records which you need to describe, the line delimited, and then the comma delimited.

    Set your root node to have a child delimiter of CR/LF.  Then create two sub-records.  The first you need to set to comma delimiter and then populate all your CSV fields.

    The second you just need to put in a dummy field (as the last line is blank).


    If this is helpful or answers your question - please mark accordingly.
    Because I get points for it which gives my life purpose (also, it helps other people find answers quickly)

    So I should do this manually in a text editor instead of Visual Studio? What good is the FlatFile schema wizard if it doesn't really generate a valid schema?

    So you are saying the schema should essentially look like this:

     

    [ROOT]

      + [Record]

              +     [field1]

             +     [field2]

             +     [field3]

             +     [field4]

       + [Record] (Blank)

    Is that correct?

     




    • Edited by MSDEVTECH Monday, September 12, 2011 5:44 PM
    Monday, September 12, 2011 4:39 PM
  • I setup the schema exactly as you stated and now I get this error in my receive pipeline:

     

     

    There was a failure executing the receive pipeline: "MyReceivePipeline, MyPIPE, Version=1.0.0.0, Culture=neutral, PublicKeyToken=AAAAAAAAA" Source: "Pipeline " Receive Port: "MyReceivePort" URI: "C:\In\*.csv" Reason: An error occurred when parsing the incoming document: "Unexpected end of stream while looking for:

    ','

    '\r\n'

    The current definition being parsed is File. The stream offset where the error occured is 6569. The line number where the error occured is 21. The column where the error occured is 0.".  

     

    It is at the end of the file but that dummy record isn't working, I believe. The schame is as follows

     

    [ROOT]

       + [Record]

              +     [field1]

             +     [field2]

             +     [field3]

             +     [field4]

    + [BlankRecord]

          +     [Dummy]

        
    • Edited by MSDEVTECH Monday, September 12, 2011 6:25 PM
    Monday, September 12, 2011 6:11 PM
  • The layout is correct, the error will be due to the delimiter style.  Setting everything to Infix tends to be a good way to go - you also need to ensure that you set the min and max occurs on your records (1-*, 1 respectively).
    If this is helpful or answers your question - please mark accordingly.
    Because I get points for it which gives my life purpose (also, it helps other people find answers quickly)
    Tuesday, September 13, 2011 9:58 AM
  • The layout is correct, the error will be due to the delimiter style.  Setting everything to Infix tends to be a good way to go - you also need to ensure that you set the min and max occurs on your records (1-*, 1 respectively).
    If this is helpful or answers your question - please mark accordingly.
    Because I get points for it which gives my life purpose (also, it helps other people find answers quickly)

    The schema validates against the file just fine. But I am still getting that error. I have done Postfix, Infix, etc. nothing. I have even stripped everything out of the file except one record just for testing. Honestly this is ridiculous. It should not be this hard to setup a simple schema.

    Maybe something is getting cached?

    Tuesday, September 13, 2011 11:11 AM
  • Have you restarted the Host Instances after deploying the changes and before testing?
    Don't forget to mark the post as answer or vote as helpful if it does, Regards -Rohit Sharma (http://rohitbiztalk.blogspot.com)
    Tuesday, September 13, 2011 11:15 AM
    Moderator
  • The layout is correct, the error will be due to the delimiter style.  Setting everything to Infix tends to be a good way to go - you also need to ensure that you set the min and max occurs on your records (1-*, 1 respectively).
    If this is helpful or answers your question - please mark accordingly.
    Because I get points for it which gives my life purpose (also, it helps other people find answers quickly)

    The schema validates against the file just fine. But I am still getting that error. I have done Postfix, Infix, etc. nothing. I have even stripped everything out of the file except one record just for testing. Honestly this is ridiculous. It should not be this hard to setup a simple schema.

    Maybe something is getting cached?

    If the schema validates against the file as you said, what is the issue then.

    Try using the FFAsm.exe tool and see whats happening. Look here for info on this tool.

     


    Cheers,
    Bali
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    Blog: http://dpsbali-biztalkweblog.blogspot.com
    -----------------------------------------------------
    Mark As Answer or Vote As Helpful if this helps.
    Tuesday, September 13, 2011 11:17 AM
  • This is my data:

    2/3/2011,AAAAAAAAA,Mr,Joe,A,Blow,123 Happy Drive,,LOS ANGELES,CA,90010,,M,000000000,000000000,AAAA,10/24/1919,nospam@nospam.com,90010,Y,US,000-012345 ,10.50,AAAAAAA,AAAAAA, , , , , , ,AAAA,AAAAAAAAAAAAA,000000000000000,12/16,Y,1/28/2010,memo comment,AAAAAAAAA,4/1/2011,X, , , , ,AAAAAAAAAAA,3/31/2011,AAAAAAAAAA,3/28/2011,10:00,AM,AAAAAAAAA,Los Angeles,AAAAAAA {CR}{LF}

     

    And this is my schema:

    <?xml version="1.0" encoding="utf-16"?>
    <xs:schema xmlns="http://MyFlatFileSchema" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://MyFlatFileSchema" 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="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" root_reference="File" default_child_order="infix" />
        </xs:appinfo>
      </xs:annotation>
      <xs:element name="File">
        <xs:annotation>
          <xs:appinfo>
            <b:recordInfo structure="delimited" child_order="infix" sequence_number="1" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" rootTypeName="File" child_delimiter_type="hex" child_delimiter="0x0D 0x0A" />
          </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 maxOccurs="unbounded" name="Record">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" sequence_number="1" child_order="infix" child_delimiter_type="char" child_delimiter="," />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:annotation>
                    <xs:appinfo>
                      <b:groupInfo sequence_number="0" />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element name="A1Date" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="1" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A2Number" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="2" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Title" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="3" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="FirstName" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="4" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="MiddleInitial" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="5" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="LastName" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="6" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="BillingAddressLine1" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="7" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="AptNo" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="8" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="City" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="9" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="State" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="10" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Zipcode" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="11" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Country" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="12" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Gender" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="13" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="CellularPhone" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="14" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="OtherPhone" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="15" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="OtherPhoneType" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="16" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="DOB" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="17" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Email" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="18" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A4Type" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="19" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Authorization" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="20" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Location" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="21" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A5ID" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="22" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Amount" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="23" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Frequency" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="24" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="TransactionType" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="25" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Attached" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="26" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A6Name" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="27" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A7City" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="28" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A8State" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="29" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A9No" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="30" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A10No" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="31" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A11Type" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="32" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A12Name" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="33" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A13NUM" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="34" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A14Date" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="35" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A15Withdrawal" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="36" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="SignatureDate" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="37" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Comments" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="38" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="VerificationCaller" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="39" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="VerificationDate" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="40" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Confirmed" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="41" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Changes" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="42" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="AM" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="43" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="PM" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="44" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="WKEND" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="45" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="PFURepresentative" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="46" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="PFUDate" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="47" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="B1Representative" type="xs:string">
    <xs:annotation> <xs:appinfo> <b:fieldInfo justification="left" sequence_number="48" /> </xs:appinfo> </xs:annotation> </xs:element> <xs:element name="B1Date" type="xs:string">
    <xs:annotation> <xs:appinfo> <b:fieldInfo justification="left" sequence_number="49" /> </xs:appinfo> </xs:annotation> </xs:element> <xs:element name="B1TIme" type="xs:string">
    <xs:annotation> <xs:appinfo> <b:fieldInfo justification="left" sequence_number="50" /> </xs:appinfo> </xs:annotation> </xs:element> <xs:element name="B1Daypart" type="xs:string">
    <xs:annotation> <xs:appinfo> <b:fieldInfo justification="left" sequence_number="51" /> </xs:appinfo> </xs:annotation> </xs:element> <xs:element name="B1Medium" type="xs:string">
    <xs:annotation> <xs:appinfo> <b:fieldInfo justification="left" sequence_number="52" /> </xs:appinfo> </xs:annotation> </xs:element> <xs:element name="B1City" type="xs:string"> <xs:annotation> <xs:appinfo> <b:fieldInfo justification="left" sequence_number="53" /> </xs:appinfo> </xs:annotation> </xs:element> <xs:element name="B1Location" type="xs:string"> <xs:annotation> <xs:appinfo> <b:fieldInfo justification="left" sequence_number="54" /> </xs:appinfo> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>


     

    Tuesday, September 13, 2011 11:23 AM
  • Anyone, please?
    Tuesday, September 13, 2011 3:06 PM
  • Hi.

    Try this.

    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema xmlns="http://MyFlatFileSchema" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://MyFlatFileSchema" 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="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" root_reference="File" default_child_order="infix" />
        </xs:appinfo>
      </xs:annotation>
      <xs:element name="File">
        <xs:annotation>
          <xs:appinfo>
            <b:recordInfo structure="delimited" child_order="infix" sequence_number="1" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" rootTypeName="File" child_delimiter_type="hex" child_delimiter="0x0D 0x0A" />
          </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 maxOccurs="unbounded" name="Record">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" sequence_number="1" child_order="infix" child_delimiter_type="char" child_delimiter="," />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:annotation>
                    <xs:appinfo>
                      <b:groupInfo sequence_number="0" />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element name="A1Date" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="1" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A2Number" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="2" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Title" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="3" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="FirstName" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="4" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="MiddleInitial" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="5" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="LastName" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="6" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="BillingAddressLine1" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="7" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="AptNo" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="8" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="City" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="9" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="State" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="10" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Zipcode" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="11" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Country" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="12" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Gender" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="13" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="CellularPhone" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="14" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="OtherPhone" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="15" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="OtherPhoneType" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="16" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="DOB" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="17" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Email" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="18" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A4Type" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="19" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Authorization" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="20" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Location" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="21" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A5ID" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="22" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Amount" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="23" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Frequency" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="24" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="TransactionType" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="25" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Attached" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="26" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A6Name" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="27" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A7City" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="28" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A8State" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="29" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A9No" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="30" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A10No" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="31" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A11Type" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="32" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A12Name" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="33" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A13NUM" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="34" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A14Date" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="35" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="A15Withdrawal" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="36" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="SignatureDate" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="37" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Comments" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="38" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="VerificationCaller" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="39" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="VerificationDate" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="40" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Confirmed" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="41" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Changes" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="42" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="AM" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="43" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="PM" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="44" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="WKEND" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="45" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="PFURepresentative" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="46" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="PFUDate" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="47" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="B1Representative" type="xs:string">                <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="48" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="B1Date" type="xs:string">                <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="49" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="B1TIme" type="xs:string">                <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="50" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="B1Daypart" type="xs:string">                <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="51" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="B1Medium" type="xs:string">                <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="52" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="B1City" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="53" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="B1Location" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" sequence_number="54" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>

     

    File root element Child order changed to Postfix.

    Record element Child order changed to Infix.

    Tested with the following input.

    2/3/2011,AAAAAAAAA,Mr,Joe,A,Blow,123 Happy Drive,,LOS ANGELES,CA,90010,,M,000000000,000000000,AAAA,10/24/1919,nospam@nospam.com,90010,Y,US,000-012345 ,10.50,AAAAAAA,AAAAAA, , , , , , ,AAAA,AAAAAAAAAAAAA,000000000000000,12/16,Y,1/28/2010,memo comment,AAAAAAAAA,4/1/2011,X, , , , ,AAAAAAAAAAA,3/31/2011,AAAAAAAAAA,3/28/2011,10:00,AM,AAAAAAAAA,Los Angeles,AAAAAAA{CR}{LF}
    2/3/2011,AAAAAAAAA,Mr,Joe,A,Blow,123 Happy Drive,,LOS ANGELES,CA,90010,,M,000000000,000000000,AAAA,10/24/1919,nospam@nospam.com,90010,Y,US,000-012345 ,10.50,AAAAAAA,AAAAAA, , , , , , ,AAAA,AAAAAAAAAAAAA,000000000000000,12/16,Y,1/28/2010,memo comment,AAAAAAAAA,4/1/2011,X, , , , ,AAAAAAAAAAA,3/31/2011,AAAAAAAAAA,3/28/2011,10:00,AM,AAAAAAAAA,Los Angeles,AAAAAAA{CR}{LF}
    2/3/2011,AAAAAAAAA,Mr,Joe,A,Blow,123 Happy Drive,,LOS ANGELES,CA,90010,,M,000000000,000000000,AAAA,10/24/1919,nospam@nospam.com,90010,Y,US,000-012345 ,10.50,AAAAAAA,AAAAAA, , , , , , ,AAAA,AAAAAAAAAAAAA,000000000000000,12/16,Y,1/28/2010,memo comment,AAAAAAAAA,4/1/2011,X, , , , ,AAAAAAAAAAA,3/31/2011,AAAAAAAAAA,3/28/2011,10:00,AM,AAAAAAAAA,Los Angeles,AAAAAAA{CR}{LF}
    2/3/2011,AAAAAAAAA,Mr,Joe,A,Blow,123 Happy Drive,,LOS ANGELES,CA,90010,,M,000000000,000000000,AAAA,10/24/1919,nospam@nospam.com,90010,Y,US,000-012345 ,10.50,AAAAAAA,AAAAAA, , , , , , ,AAAA,AAAAAAAAAAAAA,000000000000000,12/16,Y,1/28/2010,memo comment,AAAAAAAAA,4/1/2011,X, , , , ,AAAAAAAAAAA,3/31/2011,AAAAAAAAAA,3/28/2011,10:00,AM,AAAAAAAAA,Los Angeles,AAAAAAA{CR}{LF}
    {CR}{LF}2/3/2011,AAAAAAAAA,Mr,Joe,A,Blow,123 Happy Drive,,LOS ANGELES,CA,90010,,M,000000000,000000000,AAAA,10/24/1919,nospam@nospam.com,90010,Y,US,000-012345 ,10.50,AAAAAAA,AAAAAA, , , , , , ,AAAA,AAAAAAAAAAAAA,000000000000000,12/16,Y,1/28/2010,memo comment,AAAAAAAAA,4/1/2011,X, , , , ,AAAAAAAAAAA,3/31/2011,AAAAAAAAAA,3/28/2011,10:00,AM,AAAAAAAAA,Los Angeles,AAAAAAA{CR}{LF}

    Best regards

    Rasmus Jaeger

     

     

    Monday, October 17, 2011 1:02 PM