on 08-17-2006 5:24 PM
HI Friends,
I got a scenario where I need to convert the File to XML document through Sender file adapter..
My file looks like below.
BATCH1234........
12DASER123142JMM
237DSAFDLKC839890
45SDFLASJ90011
BATCH3455...
132FGAR
SD21352525
BATCH998898...
123145DSRTW
12FSTS
So there is a Header and Body for each record set..
My XML Structure is as follows.
<TimeStructure>
<TimeRecord>
<ControlRec>
<Field1>BATCH </Field1>
<Field2> ...</Field2>
</ControlRec>
<DataRec>
<F1> ...... </F1>
<F2> ...... </F2>
</DataRec>
</TimeRecord>
<TimeRecord>
<ControlRec>
<Field1> BATCH </Field1>
<Field2> ADFAS </Field2>
</ControlRec>
<DataRec>
<F1> ...... </F1>
<F2> ...... </F2>
</DataRec>
</TimeRecord>
</TimeStructure>
The blog <a href="/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem:///people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
is somewhat relevant to my requirement.
But the problem is I have the keyfield "BATCH" for my header file but don't have any <b>key field in the data record</b> of the input file.
Please help me out how to mention the configuration parameters.
Regards,
Kumar
Hi,
If you don't have constant key value for your detail records, then you can not directly get the required xml.
So in this case, you can read all the records in a common Row model, i.e each record will be considered as a one row with all the values, and then split this row with Substring or java functions in the mapping.
Even you can do this in the Adapter module .
If you have key value for each record to identify then you can try with content conversion.
Regards,
Moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ajai,
If you have multiple recorset structure, you will need key filed value.
Otherwise you keep everything in flat structure and make a deep nested structure in Mapping program.
or use Adapter module to create the desired structure.
Regards,
Satish Chauhan
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 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.