Biztalk Flat File Schema Wizard: Parsing config files - biztalk

I have several config files that may or may not have certain attributes.
For example:
Property1 : value1
Property2 : value2
.
junk text
junk text : line count between useful data varies in every file.
junk text
.
Property3 : value3 //optional
Is there a way to only retrieve the properties by Tag Identifier only, and skip all the junk in between?
So far, I cannot figure out how to make skip the junk. "Ignore" is only allowed after "Record Sequence"

Yes, something like the below, where you tell it to look for certain tags, and have records without tags to consume those you aren't interested in.
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://Scratch.Junk" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://Scratch.Junk" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>
<b:schemaInfo standard="Flat File" root_reference="Root" 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" />
<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="Root">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" sequence_number="1" child_order="postfix" child_delimiter_type="hex" child_delimiter="0x0D 0x0A" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element name="Property1">
<xs:annotation>
<xs:appinfo>
<b:recordInfo sequence_number="1" structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" tag_name="Property1 :" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element name="value1" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="1" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Property2">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" tag_name="Property2 :" 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="value2" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="1" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" maxOccurs="unbounded" name="Junk">
<xs:annotation>
<xs:appinfo>
<b:recordInfo sequence_number="3" structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element name="JunkValue" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="1" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="Property3">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" tag_name="Property3 :" 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="value3" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="1" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" maxOccurs="unbounded" name="MoreJunk">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" sequence_number="5" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element name="JunkValue" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="1" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

Related

Is it possible to insert 50 000 record in single statement in BIzTalk Server?

I have 1 flat file it will contains more than 100k rows. I need to entry in table (Dynamic table based on data). so it is possible to insert data in batch wise in BizTalk?
Here is my Biztalk Mapping.
Biztalk project Configuration.(Batch size in 100 still insert single record at a time.)
following biztalk project add single record but need to add multiple line in once statement.
I have checked it will insert one by one record, so it will take to much time. So can anyone please provide the alternative solution for the Biztalk server to handle large data.
Here, Is my text file.
Here, Is my Table structure.
Here, is my Table insert.
Here, is my WCF-SQL Binding.
Here, my trigger to check same.
here my BizTalk Orchestration
Here, is Output of Test mapping.
Here is Receive File Flat File Schema wizard(.txt file).
Attach Receive File .xsd file for more idea.
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://SplitLargeFileIntoXML.ReceiveFileSchema" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://SplitLargeFileIntoXML.ReceiveFileSchema" 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="ReceiveFileSchema" />
</xs:appinfo>
</xs:annotation>
<xs:element name="ReceiveFileSchema">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0xA" child_order="postfix" 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="ISA">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter="~" 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="ISA_Child1" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="ISA_Child2" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="ISA_Child3" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="3" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="ISA_Child4" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="4" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="ISA_Child5" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="5" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="ISA_Child6" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="6" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="ISA_Child7" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="7" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="ISA_Child8" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="8" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="ISA_Child9" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="9" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="ISA_Child10" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="10" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="ISA_Child11" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="11" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="ISA_Child12" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="12" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="ISA_Child13" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="13" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="ISA_Child14" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="14" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="ISA_Child15" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="15" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="ISA_Child16" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="16" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="ISA_Child17" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="17" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GS">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter="~" child_order="infix" 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 name="GS_Child1" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="GS_Child2" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="GS_Child3" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="3" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="GS_Child4" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="4" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="GS_Child5" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="5" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="GS_Child6" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="6" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="GS_Child7" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="7" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="GS_Child8" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="8" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="GS_Child9" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="9" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CustomerName">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter="=" child_order="infix" 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 name="CustomerName_Child1" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="CustomerName_Child2" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CustomerID">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter="=" child_order="infix" 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 name="CustomerID_Child1" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="CustomerID_Child2" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SubScriptionID">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter="=" child_order="infix" sequence_number="5" 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="SubScriptionID_Child1" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="SubScriptionID_Child2" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="DocumentID">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter="=" child_order="infix" 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 name="DocumentID_Child1" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="DocumentID_Child2" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="MediaCreateDate">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter="=" child_order="infix" sequence_number="7" 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="MediaCreateDate_Child1" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="MediaCreateDate_Child2" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SubScriptionType">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter="=" child_order="infix" sequence_number="8" 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="SubScriptionType_Child1" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="SubScriptionType_Child2" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" maxOccurs="unbounded" name="Details">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0x9" child_order="infix" sequence_number="9" 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="Details_Child1" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Details_Child2" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Details_Child3" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="3" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Details_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 name="GE">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter="~" child_order="infix" sequence_number="10" 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="GE_Child1" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="GE_Child2" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="GE_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 name="IEA">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter="~" child_order="infix" sequence_number="11" 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="IEA_Child1" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="IEA_Child2" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="IEA_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>
Yes, it is possible to do.
First off when you generate your database schema make sure you use the TableOp/Insert.
And in your Action of your WCF-SQL or WCF-Custom with sqlbindings have one of the below. The first if are sending multiple different Operations through the same port (then the Operation name has to match that set in the message context, either via Orchestration Logical Port Operation name or BRE rules), or the second you can use if you are only sending one type of payload.
<BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Operation Name="InsertCustomer" Action="TableOp/Insert/dbo/CustomerDetails" />
<Operation Name="InsertPO" Action="TableOp/Insert/dbo/PurchaseOrder" />
</BtsActionMapping>
or
TableOp/Insert/dbo/CustomerDetails
Of course replacing CustomerDetails with whatever table you are trying to insert into.
From the looks of it your map or schema is probably not correct, and if you test it in Visual Studio, you would also probably get a single record, and that is where the problem is.
In this case your schema looks to be wrong as your Rows have a MaxOccur of 1, e.g. 1 line. Try changing that to MaxOccurs *

Unmatched wrap character for a wrapped field with comma in it

I have this CSV input:
Username,"Certification ID number","Certification Name","Date completed","Date due"
nlxxxxxx,NLaaa,"NL - Test certificaat",1/12/2021,"15/12/2022, 07:55"
nlyyyyyy,CPbbb-cert,"Test Law certificaat",1/12/2021,"30/11/2023, 09:10"
I get from BizTalk Test Mapper the following error:
error btm1041: Native Parsing Error: Unmatched wrap character "
The current definition being parsed is Certificate. The stream offset where the error occured is 153. The line number where the error occured is 2. The column where the error occured is 68.
I assume the error comes from the Date due field. I setted this field with wrap character property (see XSD below).
<?xml version="1.0" encoding="utf-16" ?>
<xs:schema xmlns="http://Securitas.ESB.HR.LMSToAfas_ManageCertificate.Schemas.LMSCertificate" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://Securitas.ESB.HR.LMSToAfas_ManageCertificate.Schemas.LMSCertificate" 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="LMSCertificate" />
</xs:appinfo>
</xs:annotation>
<xs:element name="LMSCertificate">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0xA" child_order="postfix" 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 structure="delimited" child_delimiter_type="char" child_delimiter="," 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="Username" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="CertificationID" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="CertificationName" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="3" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="DateCompleted" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="4" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="DateDue" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="5" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element maxOccurs="unbounded" name="Certificate">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter="," child_order="infix" 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 name="Username" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="CertificationID" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="CertificationName" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="3" wrap_char_type="char" wrap_char=""" pad_char_type="hex" pad_char="0x20" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="DateCompleted" type="xs:date">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="4" pad_char_type="hex" pad_char="0x20" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="DateDue" type="xs:dateTime">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="5" wrap_char_type="char" wrap_char=""" pad_char_type="none" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
I can't figure out where I am wrong
First of you need to check what your lines end with, you've defined it as LF, but if it is CR LF it will throw the error above. Change it to 0x0D 0x0A on the root node.
If you then get the below, then the final line doesn't have the delimiter and you need to change the child order on the root node LMS Certificate to Infix.
The current definition being parsed is Certificate. The stream offset where the error occured is 227. The line number where the error occured is 3. The column where the error occured is 72.
Next you will get the below errors
The 'DateCompleted' element is invalid - The value '1/12/2021' is invalid according to its datatype 'http://www.w3.org/2001/XMLSchema:date' - The string '1/12/2021' is not a valid Date value.
The 'DateDue' element is invalid - The value '15/12/2022, 07:55' is invalid according to its datatype 'DateTime' - The string '15/12/2022, 07:55' is not a valid DateTime value.
The 'DateCompleted' element is invalid - The value '1/12/2021' is invalid according to its datatype 'http://www.w3.org/2001/XMLSchema:date' - The string '1/12/2021' is not a valid Date value.
The 'DateDue' element is invalid - The value '30/11/2023, 09:10' is invalid according to its datatype 'DateTime' - The string '30/11/2023, 09:10' is not a valid DateTime value.
Set the DateCompleted Custom Date/Time Format to d/MM/yyyy, that will eliminate two of the errors.
Now the DueDate one is tricky, I tried a Custom Date/Time Format of d/MM/yyyy, hh:mm, but it didn't work and stil threw the same two errors. If I changed it to a String it parsed correctly. A clue was when I generated an native instance was that it would populate it as DueDate. After I copied your other date and renamed it, updated it to a DateTime and updated the custom format it worked.
Differences
child_delimiter="0x0D 0x0A" on LMSCertificate
Not sure if this got corrupted when you posted to StackOveflow, but wrap_char=""" isn't valid, it should be wrap_char="""
datetime_format="d/MM/yyyy" on DateCompleted
pad_char_type="hex" pad_char="0x20" datetime_format="d/MM/yyyy, hh:mm" on DueDate
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://Securitas.ESB.HR.LMSToAfas_ManageCertificate.Schemas.LMSCertificate" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://Securitas.ESB.HR.LMSToAfas_ManageCertificate.Schemas.LMSCertificate" 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" 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="LMSCertificate" />
</xs:appinfo>
</xs:annotation>
<xs:element name="LMSCertificate">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0x0D 0x0A" child_order="postfix" 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 structure="delimited" child_delimiter_type="char" child_delimiter="," 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="Username" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="CertificationID" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="CertificationName" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="3" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="DateCompleted" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="4" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="DateDue" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="5" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element maxOccurs="unbounded" name="Certificate">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter="," child_order="infix" 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 name="Username" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="CertificationID" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="CertificationName" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="3" wrap_char_type="char" pad_char_type="hex" pad_char="0x20" wrap_char=""" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="DateCompleted" type="xs:date">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="4" pad_char_type="hex" pad_char="0x20" datetime_format="d/MM/yyyy" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="DateDue" type="xs:dateTime">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" pad_char_type="hex" pad_char="0x20" datetime_format="d/MM/yyyy, hh:mm" sequence_number="5" wrap_char_type="char" wrap_char=""" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Output
<LMSCertificate xmlns="http://Securitas.ESB.HR.LMSToAfas_ManageCertificate.Schemas.LMSCertificate">
<Header xmlns="">
<Username>Username</Username>
<CertificationID>"Certification ID number"</CertificationID>
<CertificationName>"Certification Name"</CertificationName>
<DateCompleted>"Date completed"</DateCompleted>
<DateDue>"Date due"</DateDue>
</Header>
<Certificate xmlns="">
<Username>nlxxxxxx</Username>
<CertificationID>NLaaa</CertificationID>
<CertificationName>NL - Test certificaat</CertificationName>
<DateCompleted>2021-12-01</DateCompleted>
<DateDue>2022-12-15T07:55:00.0000000</DateDue>
</Certificate>
<Certificate xmlns="">
<Username>nlyyyyyy</Username>
<CertificationID>CPbbb-cert</CertificationID>
<CertificationName>Test Law certificaat</CertificationName>
<DateCompleted>2021-12-01</DateCompleted>
<DateDue>2023-11-30T09:10:00.0000000</DateDue>
</Certificate>
</LMSCertificate>
P.S. I also assumed that the extra lines in your sample were due to trying to format it for StackOverflow, and that it actually looks like this
Username,"Certification ID number","Certification Name","Date completed","Date due"
nlxxxxxx,NLaaa,"NL - Test certificaat",1/12/2021,"15/12/2022, 07:55"
nlyyyyyy,CPbbb-cert,"Test Law certificaat",1/12/2021,"30/11/2023, 09:10"

Make some fields on the header of a flatfile schema optional

I have a flat file schema that has the header and the data.
I made some data fields optional by changing the property min occurs to 0 and it worked.
I tried doing the same in the header and the header details properties but it didn't work.
What else do I have to change?
Here's part of the schema. Contains the header, headerdetails and data nodes properties, the first field of each that's mandatory and the first trailling field I want optional which is the 7th
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://ABC.ao/middleware/servicos/docfinanceiro/balancete/v1" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://ABC.ao/middleware/servicos/docfinanceiro/balancete/v1" 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="1252" 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="true" early_terminate_optional_fields="false" allow_message_breakup_of_infix_root="false" compile_parse_tables="false" root_reference="Balancete" />
</xs:appinfo>
</xs:annotation>
<xs:element name="Balancete">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0xD 0xA" sequence_number="1" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" child_order="postfix" />
<b:properties>
<b:property distinguished="true" xpath="/*[local-name()='Balancete' and namespace-uri()='http://ABC.ao/middleware/servicos/docfinanceiro/balancete/v1']/*[local-name()='Header' and namespace-uri()='']/*[local-name()='Data' and namespace-uri()='']" />
</b:properties>
</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 structure="delimited" child_delimiter_type="char" child_delimiter=";" 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="Entidade" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Data" type="xs:date">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" datetime_format="yyyy-MM-dd" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Field_1" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="3" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Field_2" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="4" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Field_3" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="5" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Field_4" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="6" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Field_5" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="7" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Field_6" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="8" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Field_7" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="9" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Field_8" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="10" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Field_9" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="11" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Field_10" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="12" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Field_11" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="13" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Field_12" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="14" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Field_13" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="15" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Field_14" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="16" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Field_15" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="17" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Field_16" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="18" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Field_17" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="19" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Field_18" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="20" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Field_19" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="21" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Field_20" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="22" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Field_21" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="23" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Field_22" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="24" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Field_23" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="25" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="HeaderDetails">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter=";" child_order="infix" 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 name="HeaderDetails_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" name="HeaderDetails_Child7" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="7" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="unbounded" name="Data">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter=";" child_order="infix" 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 name="NumConta" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Especificacao" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="7" />
</xs:appinfo>
</xs:annotation>
</xs:element>
I want this file to be accepted.
But at the moment this is the one that works
Because biztalk is looking for the semicolon delimiters, using the first file, the first rows of data (first 6) are considered as part of the header. That's why I have to add the extra semicolons as shown in the second picture.
Well....what kind of flat file? And what do you mean by 'optional'?
You generally cannot make flat file fields optional unless they are trailing fields and the first and all subsequent fields are optionable.
This is because all flat files are position sensitive. Field "First Name" is always in position 8 and can't shift to 7 because 6 is 'optional'.

BizTalk flatfile schema tags not at start of line

I am having trouble understanding how to create a schema for the following type of flatfiles due to the fact that the tag identifier is not on the second field.
I removed some extra data from the below example, but my problem is pretty much that the tag identifier (HDR/ODR and END) is preceded by an incremental number.
000001 HDR 0000031001 1DP
000002 ORD 0000031001 0001
000003 ORD 0000031001 0001
000004 ORD 0000031001 0001
000005 ORD 0000031001 0001
000006 END
Solutions I have seen on google seem to be debatching the lines based on the first element assuming it is the same for all fields but that doesn't work in this case.
Is there a way to set up the tag as the second element?
The file is tab separated.
If there are only those 3 tags, and the HDR and END only occur once, just create a schema where you have a schema where you have three records, 1 for the HDR, 1 for the ORD which can occur multiple times, and one for the END.
You also have to alter the Lookahead depth from the default 3 to 0 (infinite).
For example the following schema would parse that correctly.
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://Scratch.46345356" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://Scratch.46345356" 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="0" 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="Root" />
</xs:appinfo>
</xs:annotation>
<xs:element name="Root">
<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="HDR">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0x9" child_order="postfix" 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="Line" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Tag" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Data1" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="3" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Data2" 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="ORD">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0x9" child_order="infix" 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 name="Line" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Tag" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Data1" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="3" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Data2" 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 name="END">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0x9" child_order="infix" 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 name="Line" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Tag" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Resulting in
<Root xmlns="http://Scratch.46345356">
<HDR xmlns="">
<Line>000001</Line>
<Tag>HDR</Tag>
<Data1>0000031001</Data1>
<Data2>1DP</Data2>
</HDR>
<ORD xmlns="">
<Line>000002</Line>
<Tag>ORD</Tag>
<Data1>0000031001</Data1>
<Data2>0001</Data2>
</ORD>
<ORD xmlns="">
<Line>000003</Line>
<Tag>ORD</Tag>
<Data1>0000031001</Data1>
<Data2>0001</Data2>
</ORD>
<ORD xmlns="">
<Line>000004</Line>
<Tag>ORD</Tag>
<Data1>0000031001</Data1>
<Data2>0001</Data2>
</ORD>
<ORD xmlns="">
<Line>000005</Line>
<Tag>ORD</Tag>
<Data1>0000031001</Data1>
<Data2>0001</Data2>
</ORD>
<END xmlns="">
<Line>000006</Line>
<Tag>END</Tag>
</END>
</Root>
Use Tag Identifier and Tag Offset you achieve your objective:
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://BizTalkMassCopy.FlatFileSchema6" targetNamespace="http://BizTalkMassCopy.FlatFileSchema6" 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="Root" />
</xs:appinfo>
</xs:annotation>
<xs:element name="Root">
<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 structure="positional" tag_name="HDR" tag_offset="8" 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="Count" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" pos_offset="0" pos_length="8" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="TagId" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" pos_offset="0" pos_length="3" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Item" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" pos_offset="0" pos_length="17" sequence_number="3" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="4" maxOccurs="4" name="Ord">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="positional" sequence_number="2" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" tag_name="ORD" tag_offset="8" />
</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="Count" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" pos_offset="0" pos_length="8" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="TagId" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" pos_offset="0" pos_length="3" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Item" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" pos_offset="0" pos_length="17" sequence_number="3" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="End">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="positional" sequence_number="3" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" tag_name="END" tag_offset="8" />
</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="Count" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" pos_offset="0" pos_length="8" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="TagId" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" pos_offset="0" pos_length="3" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
The result is this:
<Root xmlns="http://BizTalkMassCopy.FlatFileSchema6">
<Header xmlns="">
<Count>000001</Count>
<TagId>HDR</TagId>
<Item> 0000031001 1DP</Item>
</Header>
<Ord xmlns="">
<Count>000002</Count>
<TagId>ORD</TagId>
<Item> 0000031001 0001</Item>
</Ord>
<Ord xmlns="">
<Count>000003</Count>
<TagId>ORD</TagId>
<Item> 0000031001 0001</Item>
</Ord>
<Ord xmlns="">
<Count>000004</Count>
<TagId>ORD</TagId>
<Item> 0000031001 0001</Item>
</Ord>
<Ord xmlns="">
<Count>000005</Count>
<TagId>ORD</TagId>
<Item> 0000031001 0001</Item>
</Ord>
<End xmlns="">
<Count>000006</Count>
<TagId>END</TagId>
</End>
</Root>

Adding Sub Child records using BizTalk Flat File Schema Wizard

I am generating an XSD schema using BizTalk Flat File Schema Wizard.
I have Record Element under which there are few Attributes and a child record with few of its attributes.
Now I am able to add the Attributes under the main record but how do I add child record under it.
Please have look at the attached image do get more details of my problem.
I got answer to my question by doing some R&D.
Here is the XSD that should have been generated.
<?xml version="1.0" encoding="utf-16" ?>
<xs:schema xmlns="http://Messaging.Messages.SalesOrder_FF" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://Messaging.Messages.SalesOrder_FF" 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="SalesOrder" />
</xs:appinfo>
</xs:annotation>
<xs:element name="SalesOrder">
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0xD 0xA" child_order="postfix" 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="OrderDetail">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter="," 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 minOccurs="1" maxOccurs="1" name="CreditInfo">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter="," child_order="infix" 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:sequence>
<xs:attribute name="Employer" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:attribute>
<xs:attribute name="MonthsEmployed" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:attribute>
<xs:attribute name="PrimaryIncome" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="3" />
</xs:appinfo>
</xs:annotation>
</xs:attribute>
<xs:attribute name="OtherIncome" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="4" />
</xs:appinfo>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="StoreNumber" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:attribute>
<xs:attribute name="OrderNumber" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Cash_Cred" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="3" />
</xs:appinfo>
</xs:annotation>
</xs:attribute>
<xs:attribute name="EmployeeName" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="4" />
</xs:appinfo>
</xs:annotation>
</xs:attribute>
<xs:attribute name="TotalOrder" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="5" />
</xs:appinfo>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="CustomerInfo">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="positional" 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 name="ID" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" pos_offset="0" pos_length="5" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="CustomerName" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" pos_offset="0" pos_length="24" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="MonthsAtResidence" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" pos_offset="0" pos_length="5" sequence_number="3" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Address" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" pos_offset="0" pos_length="25" sequence_number="4" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Town" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" pos_offset="0" pos_length="10" sequence_number="5" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="State" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" pos_offset="0" pos_length="2" sequence_number="6" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="ZipCode" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" pos_offset="0" pos_length="5" sequence_number="7" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Products">
<xs:annotation>
<xs:appinfo>
<b:recordInfo tag_name="PRODUCTS" 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 maxOccurs="unbounded" name="Product">
<xs:annotation>
<xs:appinfo>
<b:recordInfo tag_name="PRODUCT" 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 name="Quantity" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="ItemNumber" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="PriceEach" 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 name="Comments" 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:schema>

Resources