cancel
Showing results for 
Search instead for 
Did you mean: 

Message Mapping - XML string between the Fields.

samiullah_qureshi
Active Contributor
0 Kudos

Hello,

I have the requirement of getting the xml string of mapped fields between the two header fields.For e.g. If the source structure is of the format.

<Header>

<f1>1</f1>

<f2>2</f2>

</Header>

and target is also of the same structure and if there is one 2 one mapping then

the Target file after should be of following format

<Header> "<?xml version="1.0" encoding="UTF-8"..........(ie xml format of the mapped values).

</Header>.

Is this scenario possible with java mapping ....if yes how???

It would be really helpful if some1 cud throw some light o n this

Regards,

Sami

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

However, I dont't think it's possible to use such message. It will be not weel formed. It will crash during the processing..

Peter

samiullah_qureshi
Active Contributor
0 Kudos

Thanks for the blog,

i nearly have the same requirement however my source structure is

<ns0:MT_Source xmlns:ns0="urn:zXML2String:Test">

<Object>

<WBS1>

<F1>sdf</F1>

<F2>fsfds</F2>

<F3>sdffs</F3>

</WBS1>

<Activity>

<F1/>

<F2/>

<F3/>

</Activity>

</Object>

</ns0:MT_Source>.....

and the desired structure is

<ns0:MT_Source xmlns:ns0="urn:zXML2String:Test">

<Object>

<WBS1>

<F1>sdf</F1> <F2>fsfds</F2><F3>sdffs</F3>

</WBS1>

<Activity> <F1/> <F2/> <F3/>

</Activity>

</Object>

</ns0:MT_Source>

Kindly provide me whats to be done exactly

Regards,

SAMI

Former Member
0 Kudos

Hi Sami,

I hope you have source fields as elements.

then can you create the target structure with <WBS1>,<Activity> as node and the fields under that as ATTRIBUTES .not as ELEMENTS.

and please let me know ,is that the structure you are looking for.

just try,not sure.

Babu sri.

Former Member
0 Kudos

Hi

Check this blog

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

regards

Sameer

Former Member
0 Kudos

Sami, write please complete target structure, as it should look like.. I don't understand this..

Peter