cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping an XML structure into one field

Former Member
0 Kudos

Hey experts,

I'm facing a problem in message mapping on XI 7.0 in an IDOC to SOAP scenario.

The source message is a deep and complex structure, the target message has only one field.

Is there a way to create an XML string from the source and put it into the target field?

Let me give an example.

1. the source message:


<src>
  <el1>
    <el11> txt1 </el11>
    <el12> txt2 </el12>
    <el13>
      <el131> txt3 </el131>
    </el13>
    <el13>
      <el131> txt4 </el131>
    </el13>
  </el1>
</src>

2. the target message should be like this:


<target>
  <el2>
    <![CDATA[<el1><el11> txt1 </el11><el12> txt2 </el12><el13><el131> txt3 </el131></el13><el13><el131> txt4 </el131></el13></el1>
  

]]>

Is there a way maybe via UDF to do this?

Thanks a lot

dee-cee

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Chk this:

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

Thanks

Amit

Former Member
0 Kudos

Thanks AmitSri,

this combination of graphical mapping and XSLT looks exactly like what I was looking for.

I think trying to create a pure UDF mapping with contexts would be a bad idea due to the complexity of our structures (and simple concatenating won't work at all).

thx @ abhishek salvi, too, although that PI 7.1 feature probably wouldn't run on our 7.0.

Answers (2)

Answers (2)

former_member189420
Active Participant
0 Kudos

Hello,

It is possible using UDF. Concatenate all the children tags and assign it to the target field in the target structure.

Cheers,

Anand Patil

former_member200962
Active Contributor
0 Kudos

Make use of XSLT mapping (available on SDN...just search with CDATA...i think there is a new feature in PI7.1 (Copy XMl to subtree....something like that).

Regards,

Abhishek.