cancel
Showing results for 
Search instead for 
Did you mean: 

How to read entire file content in one XML tag?

Former Member
0 Kudos

Hi,

How can I read entire file content in one XML tag?

What specifications do I need to specify in Sender adapter?

regards,

Anirudh.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

let me know by example what u r looking for.

chirag

Former Member
0 Kudos

Hi Chirag,

I am reading a flat file for File to Idoc scenario.

Target Idoc is nested which can not be populated with graphical mapping.

see below post for more detail.

[Mapping flat XML to nested IDOC using node functions |;

The problem here is I'm not able to identify when to insert context change for child which is repeating for a repeating parent.

Solution therefore, I think is reading entire flat structure in one node and then use UDF to populated intermediate target with proper nesting.

Thats why I need to read entire XML.

regards,

Anirudh.

Shabarish_Nair
Active Contributor
0 Kudos

to populate entire source data into one XML tag,

1. Write an adapter module at the source adapter

2. Use a java mapping

i suggest use a java mapping.

Read the file as a file (not using content conversion). The write a simple java mapping. use the whole inputstream, convert it to a string and populate it in between the required node.

Former Member
0 Kudos

Hi Shabarish,

I tried reading the file, it is now into XI but it is failing in mapping.

Data Type I used was

<DT_REC>

~<TRANS>

~~<DATA>

I expected input data to be:

<MT_REC>

<TRANS>

<DATA>

WPB01|as|asd|

WPB02|as|asd|

</DATA>

</TRANS>

</MT_REC>

but it is coming as flat

WPB01|as|asd|

WPB02|as|asd|

I want to write UDF to map it to target. Is it achievable?

regards,

Anirudh.

Edited by: Anirudh Vyas on Oct 13, 2008 2:32 PM

prateek
Active Contributor
0 Kudos

See this

Regards,

Prateek