Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Read XML Binary Data Into String Variable with UTF-8

umtyzc
Participant
0 Kudos

Hi all,

I want read XML data into string variable then i edit string data and finally i will use gui_download for download xml(txt) file.

I used the following solution but I couldn't read xml data with UTF-8 as a string variable. I downloaded the file, I keep the Turkish character problem alive.

In render_2_string method:

i used - "replace 'encoding="utf-16"' with 'encoding="UTF-8"' into stream"-but nothing changed.

CALL FUNCTION 'SDIXML_DOM_TO_XML'
EXPORTING
document = lr_xmldoc
IMPORTING
xml_as_string = lx_string
size = li_size
TABLES
xml_as_table = lt_xml
EXCEPTIONS
no_document = 1
OTHERS = 2.


CREATE OBJECT go_xml_doc.
CALL METHOD go_xml_doc->parse_table
EXPORTING
table = lt_xml
* size = 0
receiving
retcode = gd_rc.
CALL METHOD go_xml_doc->render_2_string
* EXPORTING
* pretty_print = 'X'
IMPORTING
retcode = gd_rc
stream = gd_xml_string
" size =

0 REPLIES 0