Skip to Content
avatar image
Former Member

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

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 19, 2007 at 05:51 AM

    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..

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 19, 2007 at 06:04 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 19, 2007 at 06:31 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • > 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.