Re: Need help creating a xsd schema from a flat text file



On 23 Jul, 16:26, Dan Rosanova <dno...@xxxxxxxxx> wrote:
Hi,
These two sites helped me before:

http://www.codeproject.com/KB/biztalk/FFSchemaWizard.aspx(I think
this one will really help you)

http://www.winterdom.com/dev/bts/BTSFFSchemaTut1.html

The biggest thing to understand is the repeating record and Naveen
Karamchetti does a good job in that first link explaining it.  Please
let me know if you have questions after that.

Kind Regards,
-Dan Rosanova

Hi again.

Thanks for your responding.

Well, I have tried out the solution, but it did not work as expected.
Below I have added an example that would be parsed. I am not sure that
when using Flat File wizard that I should only use a small part of the
example file or the whole. In real situation the file is much much
longer. I have hoped that I ended up with a structure like this:

ROOT
-501CompanyA
-companyfield1
-companyfield2
-503EmployerAA
-Employerfield1
-Employerfield2
-504Employerdata
-Employerdatafield1
-Employerdatafield2
-504Employerdata
-Employerdatafield1
-Employerdatafield2
-506EmployerData
-Employerdatafield1
-Employerdatafield2
-503EmployerBB
-Employerfield1
-Employerfield2
-504Employerdata
-Employerdatafield1
-Employerdatafield2
-504Employerdata
-Employerdatafield1
-Employerdatafield2
-506EmployerData
-Employerdatafield1
-Employerdatafield2
-508SUM
-Sumfield1
-Sumfield2

You could try to create an xsd file out of the text below

Remember that every line is 120 character long + line feed....

5010097475218220071601Sør-Trøndelag jordskifterett
Prinsensgt. 1 7468TRONDHEIM 0
5030097475218201065145150SIGMUND
GRÅBAK 7234LER
1653N 00200
5040097475218201065145150111A00001600+00000000+000002+
000000000000+0000000000000000000+
5040097475218201065145150614 00000280+00000000+000002+
000000000000+0000000000000000000+
5040097475218201065145150711 00000318+00000000+000106+
000000000000+0000000000000000000+
5060097475218201065145150916 00000250+SKATTEFRI DEL AV
SLUTTVEDERLAG
5030097475218221077033669JANNE SMØRDAL
BLEKE 7224MELHUS
1653N 00200
5040097475218221077033669111A00001600+00000000+000002+
000000000000+0000000000000000000+
5040097475218221077033669614 00000280+00000000+000002+
000000000000+0000000000000000000+
5040097475218221077033669711 00000240+00000000+000080+
000000000000+0000000000000000000+
5080097475218200000020000006
00000000000003200+0000000000+0000004318+0000000000+0000000000+0000000000+



Regards

Geir F
.