on 11-03-2006 6:50 AM
Hi
I am trying to do content conversion in the Sender Channel from a flat file to a XML.
My Target XML(message structure) looks like
<H1>
<H2>
<D>Detail Record</D>
<L1>line</L1>
<L1>line</L1>
</H2>
<H2>
<D>Detail Record</D>
<L1>line</L1>
<L1>line</L1>
</H2>
</H1>
Here the element <H2> is only needed to group <D> and the following <L1> elements of each new occurrence of <D>.
Now my problem is that the element <H2> is not getting created.
and the message after content conversion is looking as follows
<H1>
<D>Detail Record</D>
<L1>line</L1>
<L1>line</L1>
<D>Detail Record</D>
<L1>line</L1>
<L1>line</L1>
</H1>
What should I do to get the desired result.
Can you mention what are all the content conversion parameteres that you you entered in you rcommunication channel, here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Content conversion is allowed only upto 3 levels and hence, that might be the reason that you are not getting the desired structure.
If <h2> segment is not all that important, you could use the structure that is being generated now, and map this to the target, with constants for <h2> tag in the target.
Regards,
Smitha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Yes Bhavesh you are right.
Hi Jai,
I am trying the other way round.i.e from flat file to a XML message.As I said I was trying to do it for Sender Channel where is the after content conversion I want a XML file.The example is a what I framed out of my actual problem.
if flat file is as follows ,
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
DetailRecord1
Line1
Line2
Line3
DetailRecord2
Line4
Line5
then the XML must look like
<H1>
<H2>
<D>DetailRecord1</D>
<L1>Line1</L1>
<L1>Line2</L1>
<L1>Line3</L1>
</H2>
<H2>
<D>DetailRecord2</D>
<L1>Line4</L1>
<L1>Line5</L1>
</H2>
</H1>
I identify the different types records in the flat file
as follows,
Record starting with "Detail" is considered as <D> element
Record starting with "Line" is considered as <L> element.
Hope I did clarify.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sudip,
Upto my knowledge, using file content conversion you can get only one level hieracrchy ie
<H1>
<D>Detail Record1</D>
<D>Detail Record2</D>
</H1>
<H2>
<L1>Line1</L1>
<L1>Line2</L1>
<L1>Line3</L1>
<L1>Line4</L1>
<L1>Line5</L1>
</H2>
This is possible.
Do the content conversion like this and use JAVA mapping to group the Detail record and all its corresponding Line records.
Any way, let us wait for others to comment on this...
Regards,
Jai Shankar.
Try mapping <H2> to an empty constant.
Regards,
Jai Shankar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jai,
Thanks for your answer.But the problem is not in the mapping,but before that in the content conversion .I may be wrong in saying the target XMl message,but what I meant was the target message for the content conversion not the mapping.From mapping point of view this is the source message this is the source message.So correction needed is in the content conversion.maybe i am missing something.
COntent conversion?? After content conversion do you want the XML file?? If you need the output in XML format you have to avoid content conversion in your receiver communication channel. If you use content conversion, you will get a flat file.
@Bhavesh, What is that I am missing here? It seems I have not got the issue correctly..
Regards,
Jai Shankar.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.