cancel
Showing results for 
Search instead for 
Did you mean: 

XML into one field

Former Member
0 Kudos

Hi , we have a scenario where we have to move entire source structure into one of the fields of the target structure.

Example:

Source:

item1

description

store

storedescription

price

batch

Target:

item1

store

xmlstring

we would like to do following mappings:

1. item1 in source to item1 in target

2. store in source to store in target

3. entire source structure in XML format into xmlstring in target

we reffered following blog , but couldnt map to our requirement.

/people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping

Thanks,

Rajesh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

HI

I think you need to write UDF for this. there is library from apache called XML Serializer. Below is the sample file how you achieve that using that. Use that code in your UDF.

http://www.informit.com/articles/article.asp?p=31349&seqNum=3&rl=1

Even just concatenate into one field in the target during mapping and the send the data . this could also achive your requirments. no need to go for Java mapping

thanks

Swarup

Edited by: Swarup Sawant on Feb 15, 2008 11:42 AM

Edited by: Swarup Sawant on Feb 15, 2008 11:42 AM

Former Member
0 Kudos

Hi Swarup,

it looks like this program is creating XML segments manually by giving segment names. In our scenario, idoc structures are bit complex, it might not be possible to ccreate like this.

prateek
Active Contributor
0 Kudos

Go for java mapping. There u can pass the entire xml to a field as a string using the dom parsing

Regards,

Prateek