05-30-2017 10:02 AM
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 =