cancel
Showing results for 
Search instead for 
Did you mean: 

Delete xml version in xml file

Former Member
0 Kudos

Hello,

I have a strange thing to do. I need to delete xml version tag (<?xml version="1.0" encoding="utf-8" ?>) from en xml file. I use a receiver file adapter and I want to know how it's possible to delete this tag.

I need to do that as receiving application collects xml messages and adds xml version in collected xml file.

Thanks in advance,

Cédric

Accepted Solutions (1)

Accepted Solutions (1)

udo_martens
Active Contributor
0 Kudos

Hi Cedric,

you can do that with a ABAP mapping. Convert to string with function module ECATT_CONV_XSTRING_TO_STRING, replace your string with nothing (or split), convert back with ECATT_CONV_STRING_TO_XSTRING.

Regards,

Udo

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks a lot Michal, excellent blog!

Cédric

MichalKrawczyk
Active Contributor
0 Kudos

thx:)

Regards,

michal

Former Member
0 Kudos

Udo, Michal,

Thanks for your answers. I will try them. Michal, can you explain me how to add xsl code in communication channel?

Cédric

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

sure, just have a look at my weblog (at the end of it):

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

Regards,

michal

-


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

MichalKrawczyk
Active Contributor
0 Kudos

hi,

you can do it with XSLT:

<xsl:output method="html"/> should not create

<?xml version="1.0" encoding="utf-8" ?>

Regards,

michal

udo_martens
Active Contributor
0 Kudos

Hi Michal,

easy and clever...

Regards,

Udo

MichalKrawczyk
Active Contributor
0 Kudos

hi Udo,

>>>and clever...

so it should be you who proposed it:)

BTW

I'm not sure if with XSLT you won't have to

do it in the commnication channel (and not in the interface mapping) - (the xslt mapping)

but I cannot test it right now

Regards,

michal