cancel
Showing results for 
Search instead for 
Did you mean: 

how to remove a node from a target xml payload in reciever file channel

Former Member
0 Kudos

i have a scenario where i have to remove a node from my target xml file in receiver file channel and want xml as the output file. I don't want a fixed length file. How to do that in receiver channel? Do we need to use file content conversion for that?

Accepted Solutions (1)

Accepted Solutions (1)

former_member192892
Active Contributor
0 Kudos

If you want XML output, you don't need to do file content conversion.

Also to remove one tag, don't map that particular node at all..

Answers (2)

Answers (2)

Former Member
0 Kudos

actually i want that in mapping i'm storing values of dynamic directory names in that element which i'm using in variable substitution further in channel.

Former Member
0 Kudos

hi

Right click and disable the node and try...

regards

Ramesh P

Shabarish_Nair
Active Contributor
0 Kudos

yes you can remove a particular node - /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12

follow the weblog for the same.

Former Member
0 Kudos

but i want to know that will i be getting a xml as output or fixed length file? and i was using this before also but was not working for me do i have to do anything more in configuration?

Shabarish_Nair
Active Contributor
0 Kudos

that will result in giving you a fixed file or a separator defined file.

it will not give you an XML file.

In case you want a XML file, instead of using variable substitution, use Dynamic configuration and adapter specific properties.

Some ref:

/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm

Former Member
0 Kudos

i can't use dynamic configuration because i have to create multiple directories using single file adapter that too is based source payload. so i am using variable substitution for both file name and directory.

Shabarish_Nair
Active Contributor
0 Kudos

in such a case then u might have to go for a adapter module. Dont see any other standard work arounds.

henrique_pinto
Active Contributor
0 Kudos

> i can't use dynamic configuration because i have to

> create multiple directories using single file adapter

> that too is based source payload. so i am using

> variable substitution for both file name and

> directory.

Abhimanyu,

dynamic configuration does exactly that.

It will do exactly what variable substitution does with even more flexibility regarding the filename and directory strings.

Regards,

Henrique.

Former Member
0 Kudos

If you really have to do it in the Receiver Channel (and cannot just leave it out in the mapping), you can also implement a module that filters out the element. The module can have a parameter with the XPath or the Name of the Element you would like to filter and implement a simple SAX Parser that writes only the elements to the output that are not filtered.

However, if you can, this should be filtered out in the mapping already.

regards,

Peter