Hi!
I hope some of you have experience with creating a xsd schema from a
text file. I have tried using flat file wizard but I am not sure if I
got it right. I am putting the text file below. It is a text file
fixed text lines 120 characters long plus a line feed.
If you study the text file you see that each line starts with 501,
503, and so on.
The 501 line is appearing only once
The 503 line is apperaring more than once(employer identifier), but
it
is always followed by a 504 lines (sometime a 506 line is also there,
but basically 504 lines)
The 504 and 506 lines are both details info about the employer.
Then a new 503 line (new employer) comes up, and the followed by 504
lines and so on.
Finally, we have sum line which is the last line and starts with 508.
Well here you see the pattern. I don't expect you to understand every
part of the lines in the file below. but I need some tip how to
arrange the xsd file to sup****t the content from the text file.
I have expected something like this out of the flat file wizard
xsd Schema
ROOT
-501CompanyA (only one)
-companyfield1
-companyfield2
-503EmployerAA (0 to unbound)
-Employerfield1
-Employerfield2
-504Employerdata (0 to unbound)
-Employerdatafield1
-Employerdatafield2
-506EmployerData (0 to unbound)
-Employerdatafield1
-Employerdatafield2
-508SUM (only one)
-Sumfield1
-Sumfield2
xml file example
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
Below I have added an example of a text file. You could try to create
an xsd file out of the text below.Remember that every line is 120
character long + line feed....
Before you start, I like to ask:
- Should I tag every line with 501,503 and so on
- Should I use the whole file marking all the lines below or only some
parts of it?
- As you see 501, 503, 504, 506 and 508 lines are all records, but
only 501 and 508 appears only once. 503 is repeated if there are more
than one employee. It could be followed by a 504, and then a new 504
line
but it could also be a 506 line. I have a problem to understand when
to use Record and repeating records and ignore here....
5010097475218220071601S=F8r-Tr=F8ndelag jordskifterett
Prinsensgt. 1 7468TRONDHEIM 0
5030097475218201065145150SIGMUND
GR=C5BAK 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
****TVEDERLAG
5030097475218221077033669JANNE SM=D8RDAL
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


|