Re: Flat file import wizard schema issue

Home Page Forums BizTalk 2004 – BizTalk 2010 Flat file import wizard schema issue Re: Flat file import wizard schema issue

#26300

Here is a schema that will parse what you request. Just added a field after the tag identifiers to test, so the tested file looks like this:

 

000111

000222

000333

000334

000444

000223

000335

000445

000777

 

Here is the schema:

<?xml version=”1.0″ encoding=”utf-16″ ?> 

<xs:schema xmlns=”http://BizTalk_Server_Project1.FlatFileSchema1&#8243; xmlns:b=”http://schemas.microsoft.com/BizTalk/2003&#8243; targetNamespace=”http://BizTalk_Server_Project1.FlatFileSchema1” xmlns:xs=”http://www.w3.org/2001/XMLSchema”>&nbsp;

<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=”speed” lookahead_depth=”3” suppress_empty_nodes=”false” generate_empty_nodes=”true” allow_early_termination=”false” early_terminate_optional_fields=”false” allow_message_breakup_of_infix_root=”false” compile_parse_tables=”false” /> 

<schemaEditorExtension:schemaInfo namespaceAlias=”b” extensionClass=”Microsoft.BizTalk.FlatFileExtension.FlatFileExtension” standardName=”Flat File” xmlns:schemaEditorExtension=”http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions&#8221; /> 

</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_delimiter_type=”hex” child_delimiter=”0x0D 0x0A” child_order=”postfix” /> 

</xs:appinfo> 

</xs:annotation> 

<xs:complexType> 

<xs:sequence> 

<xs:annotation> 

<xs:appinfo> 

<b:groupInfo sequence_number=”0” /> 

</xs:appinfo> 

</xs:annotation> 

<xs:element minOccurs=”1” maxOccurs=”1” name=”node0001“> 

<xs:annotation> 

<xs:appinfo> 

<b:recordInfo sequence_number=”1” structure=”positional” preserve_delimiter_for_empty_data=”true” suppress_trailing_delimiters=”false” tag_name=”0001” child_delimiter_type=”hex” child_order=”infix” 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=”Tag” type=”xs:string“> 

<xs:annotation> 

<xs:appinfo> 

<b:fieldInfo sequence_number=”1” justification=”left” pos_length=”4” /> 

</xs:appinfo> 

</xs:annotation> 

</xs:element> 

<xs:element name=”Field” type=”xs:string“> 

<xs:annotation> 

<xs:appinfo> 

<b:fieldInfo sequence_number=”2” justification=”left” pos_length=”2” /> 

</xs:appinfo> 

</xs:annotation> 

</xs:element> 

</xs:sequence> 

</xs:complexType> 

</xs:element> 

<xs:element minOccurs=”1” maxOccurs=”999999” name=”Loop“> 

<xs:annotation> 

<xs:appinfo> 

<b:recordInfo sequence_number=”2” structure=”delimited” preserve_delimiter_for_empty_data=”true” suppress_trailing_delimiters=”false” child_order=”infix” 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 minOccurs=”1” maxOccurs=”1” name=”node0002“> 

<xs:annotation> 

<xs:appinfo> 

<b:recordInfo structure=”positional” preserve_delimiter_for_empty_data=”true” suppress_trailing_delimiters=”false” tag_name=”0002” child_order=”infix” child_delimiter_type=”hex” child_delimiter=”0x0D 0x0A” sequence_number=”1” /> 

</xs:appinfo> 

</xs:annotation> 

<xs:complexType> 

<xs:sequence> 

<xs:annotation> 

<xs:appinfo> 

<b:groupInfo sequence_number=”0” /> 

</xs:appinfo> 

</xs:annotation> 

<xs:element name=”Tag” type=”xs:string“> 

<xs:annotation> 

<xs:appinfo> 

<b:fieldInfo sequence_number=”1” justification=”left” pos_length=”4” /> 

</xs:appinfo> 

</xs:annotation> 

</xs:element> 

<xs:element name=”Field” type=”xs:string“> 

<xs:annotation> 

<xs:appinfo> 

<b:fieldInfo sequence_number=”2” justification=”left” pos_length=”2” /> 

</xs:appinfo> 

</xs:annotation> 

</xs:element> 

</xs:sequence> 

</xs:complexType> 

</xs:element> 

<xs:element minOccurs=”1” maxOccurs=”999999” name=”node0003“> 

<xs:annotation> 

<xs:appinfo> 

<b:recordInfo structure=”positional” preserve_delimiter_for_empty_data=”true” suppress_trailing_delimiters=”false” tag_name=”0003” 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=”Tag” type=”xs:string“> 

<xs:annotation> 

<xs:appinfo> 

<b:fieldInfo sequence_number=”1” justification=”left” pos_length=”4” /> 

</xs:appinfo> 

</xs:annotation> 

</xs:element> 

<xs:element name=”Field” type=”xs:string“> 

<xs:annotation> 

<xs:appinfo> 

<b:fieldInfo sequence_number=”2” justification=”left” pos_length=”2” /> 

</xs:appinfo> 

</xs:annotation> 

</xs:element> 

</xs:sequence> 

</xs:complexType> 

</xs:element> 

<xs:element minOccurs=”1” maxOccurs=”1” name=”node0004“> 

<xs:annotation> 

<xs:appinfo> 

<b:recordInfo structure=”positional” preserve_delimiter_for_empty_data=”true” suppress_trailing_delimiters=”false” tag_name=”0004” sequence_number=”3” /> 

</xs:appinfo> 

</xs:annotation> 

<xs:complexType> 

<xs:sequence> 

<xs:annotation> 

<xs:appinfo> 

<b:groupInfo sequence_number=”0” /> 

</xs:appinfo> 

</xs:annotation> 

<xs:element name=”Tag” type=”xs:string“> 

<xs:annotation> 

<xs:appinfo> 

<b:fieldInfo sequence_number=”1” justification=”left” pos_length=”4” /> 

</xs:appinfo> 

</xs:annotation> 

</xs:element> 

<xs:element name=”Field” type=”xs:string“> 

<xs:annotation> 

<xs:appinfo> 

<b:fieldInfo sequence_number=”2” justification=”left” pos_length=”2” /> 

</xs:appinfo> 

</xs:annotation> 

</xs:element> 

</xs:sequence> 

</xs:complexType> 

</xs:element> 

</xs:sequence> 

</xs:complexType> 

</xs:element> 

<xs:element minOccurs=”1” maxOccurs=”1” name=”node0007“> 

<xs:annotation> 

<xs:appinfo> 

<b:recordInfo sequence_number=”3” structure=”positional” preserve_delimiter_for_empty_data=”true” suppress_trailing_delimiters=”false” tag_name=”0007” /> 

</xs:appinfo> 

</xs:annotation> 

<xs:complexType> 

<xs:sequence> 

<xs:annotation> 

<xs:appinfo> 

<b:groupInfo sequence_number=”0” /> 

</xs:appinfo> 

</xs:annotation> 

<xs:element name=”Tag” type=”xs:string“> 

<xs:annotation> 

<xs:appinfo> 

<b:fieldInfo sequence_number=”1” justification=”left” pos_length=”4” /> 

</xs:appinfo> 

</xs:annotation> 

</xs:element> 

<xs:element name=”Field” type=”xs:string“> 

<xs:annotation> 

<xs:appinfo> 

<b:fieldInfo sequence_number=”2” justification=”left” pos_length=”2” /> 

</xs:appinfo> 

</xs:annotation> 

</xs:element> 

</xs:sequence> 

</xs:complexType> 

</xs:element> 

</xs:sequence> 

</xs:complexType> 

</xs:element> 

</xs:schema>