cancel
Showing results for 
Search instead for 
Did you mean: 

Howto use Converting File Content in Rec. Adapt. to suppress a xml-element

Former Member
0 Kudos

Hi,

we use PI/700, SP6.

I have following structure (example):

<MsgOut>

<Sender>Partner1</Sender>

<Receiver>Partner2</Receiver>

<FlatPayload>

blabla blabla

</FlatPayload>

</Msgout>

Now I wanna use a XI-File-Adapter to write just a Flat-File with the content (of the element <FlatPayload>):

blabla blabla

(in other words: I wanna suppress all other xml-elements beside of FlatPayload)

But I'm not able to configurate this with the function "Converting File Content"

I tried different possiblities:

e.g.

setting yyy.fieldFixedLengths = 0 and yyy.fixedLengthTooShortHandling = Cut

(yyy = Sender and Receiver)

or

just defining "MsgOut,FlatPayload" as RecordSet Structure (without Sender and Receiver)

Result: no success.

Now my question: is it possible to suppress some xml-elements?

Thanks for your help!

bye

Wolfgang

Accepted Solutions (1)

Accepted Solutions (1)

moorthy
Active Contributor
0 Kudos

HI,

You can suppress the XML Nodes/Elements over here. Not Fields ..

For e.g if your outout xml is like this

<MsgOut>

<Sender>Partner1</Sender>

<Receiver>Partner2</Receiver>

<FlatPayload>

<flatdata> blabla blabla</flatdatat>

</FlatPayload>

</Msgout>

In this case you can suppress the <FlatPayload> node/element here.. Using Cut Parameter in the Receiver File Content COnversion.

/people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12

So in your case, you can restructure your data type as you required.. I have mentioned in vice-versa here

Hope this helps,

Regards,

Moorthy

Message was edited by: Krishna Moorthy P

Former Member
0 Kudos

Moorthy,

Dont u think what i told was correct? Please look into my earlier post.

As the author(of the post) does not want other XML elements in the output, we wont have any other things in the target DT except what he wanted.

Evaluate me.

-Naveen.

moorthy
Active Contributor
0 Kudos

Yes , it is correct , if you are ready to change the Target Structure .Many a times, there will be some other functions for the other nodes . Because for e.g dynamic file name etc.. There will be a some purpose of that fields...

Thanks,

Moorthy

Answers (1)

Answers (1)

Former Member
0 Kudos

Wolfgang Hummel,

While defining the DT, just define the DT on the receiver side with <b>FlatPayload</b> only.

I think this should solve.

Please correct me if I am wrong.

-Naveen.