cancel
Showing results for 
Search instead for 
Did you mean: 

Downloading an XML file from WebDynpro

Former Member
0 Kudos

Hi All,

We've a requirement to download composition of formula ( some object ) into XML format in the client system.

We've the method to form the XML string but in this XML string encoding attribute is coming as UTF-16.

I'm using ATTACH_FILE_TO_RESPONSE method to download the file and download happens successfuly.

But when I view this document in internet explorer I get the following error:

'Switch from current encoding to specified encoding not supported.'

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

Now my requirement is to althogether remove this encoding attribute from XML string formed.

Any ideas how can we achieve this.

Or

Any other alternative to download an XML document

Regards

Manas Dua

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I don't believe this is actually a question related to Web Dynpro ABAP. The real question is how can you render your XML into a different encoding. Just changing the encoding specification at the beginning of the XML isn't enough. Technically the rest of the content will still be encoded in UTF-16. How are you building the XML? Are you using the iXML parser? You need to specify the output encoding you want from the stream renderer. I would think you might want to use UTF-8 instead. However this is really a question for ABAP general forum and not WDA.

Answers (0)