on 10-06-2012 12:30 PM
Hi All,
I have to convert fixed length text file into XML using java mapping.
Few points: Every line consist of 16 characters
First 3 caharacter (like D02,D03 etc will not be included in the message, coming from the sender just for reference))
Every new record will start from "H" character.
059 (occurrence 1), 040 (occurrence 1) and 084 (more than 1 occ) are the key fields to identify new segment (highlighted below)
The fields within the segments are fixed length (shown below).
File structure:
H01A12B1059C1DE1
D02F12040G123H12
D033084002L123M1
D04234NO12P12Q12
D05R4RR2V1234567
<Record>
<Header>....................1..unbounded
<Key>H</Key>
<Filed1>A12</Field2>
<Field2>B1</field2>
<One>
<Key>059</Key>
<Field3>C1</Field3>
<Field4>D</Field4>
<Field5>E1</Field5>
<Field6>F12</Field6>
</One>
<Two>
<Key>040</key>
<Field7>G123</Field7>
<Field8>H123</Field8>
</Two>
<Three>
<Key>084</Key>
<Occ>002</occ>
<Repeat>............................1..unbounded
<Field9>L123</Field9>
<Field10>M1234</Field10>
<Field11>NO12P12</Field11>
</Repeat>
<Repeat>
<Field9>Q12R</Field9>
<Field10>4RR2V</Field10>
<Field11>1234567</Field11>
</Repeat>
</Three>
</Header>
</Record>
Regards!!
Hi,
>>>I have to convert fixed length text file into XML using java mapping.
go ahead then and come back in case you'd have any issues/questions,
BTW
there are many blogs on java mappings on SDN so you can use them for a start,
Thank you,
Regards,
Michal Krawczyk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.