cancel
Showing results for 
Search instead for 
Did you mean: 

Remove XML tags in the File Adapter

Former Member
0 Kudos

Hi,

I have a JDBC to File interface. However, there is a requirement to remove some of the XML tags from XML produced by the File Adapter.

For example,


<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_XML xmlns:ns0="namespace">
   <XMLIntegration>
         <Prices COLUMNS="Index, Date, Price">
         <Index>Fuel</Index>
         <Date>2007-05-01 00:00:00.0</Date>
         <Price>0</Price>
        </Prices>
      <Prices COLUMNS="Index, Date, Price"/>
  </XMLIntegration>
</ns0:MT_XML>

needs to be changed to


   <XMLIntegration>
         <Prices COLUMNS="Index, Date, Price">
         Fuel, 2007-05-01 00:00:00.0, 120.65
        </Prices>
  </XMLIntegration>

Does anyone know how to do this? I'm using the File Content Conversion Message Protocol but I'm not having much success

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

you just need to have this:

<XMLIntegration>

<Prices COLUMNS="Index, Date, Price">

Fuel, 2007-05-01 00:00:00.0, 120.65

</Prices>

</XMLIntegration>

as your target message in your mapping

and map all values to Prices tag

you don't need no content conversion - just the mapping

Regards,

michal

Answers (3)

Answers (3)

Former Member
0 Kudos

Michal's reply is the one I'm going to go for

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

I'm sure it will work trust me

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Former Member
0 Kudos

Hi Michal,

Is it possible to avoid the XML declaration using graphical mapping? I thought it was not possible.

Regards,

Jai Shankar

Former Member
0 Kudos

Jai

I believe it is under assumption that the XML declaration for the target is taken to be present implicitly

Regards

krishna

Former Member
0 Kudos

I guess you need to be using adapter module

REgards

krishna

Former Member
0 Kudos

This structure is neither XML nor Flat file content. So using FCC will not serve your purpose. If your requirement is to strictly get this structure, then use a JAVA/ABAP/XSLT mapping and create the structure you need. In the File adapter use the Message protocol <b>File</b>.

Regards,

Jai Shankar

prabhu_s2
Active Contributor
0 Kudos

Jai,

<b>>>>This structure is neither XML nor Flat file content</b>

would like to know which part u are refering to and y?

Former Member
0 Kudos
<XMLIntegration>
         <Prices COLUMNS="Index, Date, Price">
         Fuel, 2007-05-01 00:00:00.0, 120.65
        </Prices>
  </XMLIntegration>

Since this does not contain a XML declaration at the beging, this is not a XML file.

It is a flat file content but does not have any field separator or fixed lengths. that is what I tried to mention.

Regards,

Jai Shankar

prabhu_s2
Active Contributor
0 Kudos

okieee....i had a confusion if u are refering to the first structure.