on 08-22-2005 8:13 PM
Hello all,
i have the following problem to set up a nested XML-structure to an flatfile.
XML-Structure:
LtcRecords (root)
Header
Deduction
Trailer
Now i want to convert the Header,Deduction and Trailer values to an flatfile.
I tried it with a lot of possibilies. But without an result.
Recordset Structur: LtcRecords
LtcRecords.fieldNames: Header,Deduction,Trailer
Header.fieldFixedLengths: 1,10,5
Header.fieldNames:id,group_id,location_id
Deduction.fieldFixedLengths: 1,10,3
Deduction.fieldNames:id,group_id,product_code
Trailer.fieldFixedLengths: 1,10,5,3
Trailer.fieldNames:id,group_id,location_id,product_code
I hope somebody can help me with my wrong settings.
Many thanks
ilka
-
Attachments:
Source:
<?xml version="1.0" encoding="utf-8" ?>
<ns1:mt_Metlife0>
<LtcRecords>
<Header>
<id>A</id>
<group_id>0000700015</group_id>
<location_id>00002</location_id>
</Header>
<Deduction>
<id>D</id>
<group_id>0000700015</group_id>
<product_code>GPC</product_code>
</Deduction>
<Trailer>
<id>Z</id>
<group_id>0000700015</group_id>
<location_id>00002</location_id>
<product_code>GPC</product_code>
</Trailer>
</LtcRecords>
<LtcRecords>
<Header>
<id>A</id>
<group_id>0000700013</group_id>
<location_id>00005</location_id>
</Header>
<Deduction>
<id>D</id>
<group_id>0000700013</group_id>
<product_code>GPC</product_code>
</Deduction>
<Trailer>
<id>Z</id>
<group_id>0000700013</group_id>
<location_id>00005</location_id>
<product_code>GPC</product_code>
</Trailer>
</LtcRecords>
</ns1:mt_Metlife0>
Target:
A000070001500002
D0000700015GPC
Z000070001500002GPC
A000070001300005
D0000700013GPC
Z000070001300005GPC
Hi
I tried the same scenario successfully.
I had given the same input xml and got same output as u want.
The settings of my File Adapter is as follows:
Recordset Structure: LtcRecords,Header,Deduction,Trailer
Header.fieldFixedLengths: 1,10,5
Header.fieldNames:id,group_id,location_id
Deduction.fieldFixedLengths: 1,10,3
Deduction.fieldNames:id,group_id,product_code
Trailer.fieldFixedLengths: 1,10,5,3
Trailer.fieldNames:id,group_id,location_id,product_code
LtcRecord.fieldSeparator:'nl'
File Type: Text
File Encoding:UTF-8
Try with these settings u will definately get the output.
Regards
Arpit Seth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi llka,
try using following content conversion:
Recordset structure : Header,Deduction,Trailer
Header.fieldFixedLengths = 1,10,5...
Deduction.fieldFixedLenghts = 1,10,3...
Trailer.fieldFixedLenghts = 1,10,5,3
Header.fixedLengthTooShortHandling = ignore
Deduction.fixedLengthTooShortHandling = ignore
Trailer.fixedLengthTooShortHandling = ignore
This worked for me.
Regards,
Sulakshana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Arpit, no that is not the solution. The result is an file with 0 kb.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Make ur settings as follows and then chk it
Recordset Structur: LtcRecords,Header,Deduction,Trailer
LtcRecords.fieldNames: Header,Deduction,Trailer
Header.fieldFixedLengths: 1,10,5
Header.fieldNames:id,group_id,location_id
Deduction.fieldFixedLengths: 1,10,3
Deduction.fieldNames:id,group_id,product_code
Trailer.fieldFixedLengths: 1,10,5,3
Trailer.fieldNames:id,group_id,location_id,product_code
LtcRecords.fieldSeperator:'nl'
Hope it helps.
Regards
Arpit Seth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, the blog shows me the sender case!
How can i config the the "Recordset Name" and the "Recordset Structur"
for the receiver case?
thanks
ilka
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Look at Venkat's blog
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
regards
SKM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.