Of course Ramesh,
I could remove those spaces from my string to use just the ABAP key word replace all occurrences of regex . But my problem was that i stored data in a internal table, witch contains lines, en every end-line for XML is interpreted as large space, so " replace all occurrences of regex " is not going to help in this case.
As solution, i stored data of internal table in a string by looping from ITAB to WA.
xml_str1 = '<?xml version="1.0" encoding="iso-8859-1"?>'.
loop at gt_xml into gt_xml-line.
concatenate xml_str1 gt_xml-line into xml_str1.
endloop.
So now i stored all of data in a string xml_str1, witch i gave it to this class-method:
call method cl_salv_data_services=>download_xml_to_file
exporting
content = xml_str1
filename = 'C:\Users\Ouail\Desktop\XML_FILE.XML'.
In this was i get data without any space.
Please close this thread.
Thanks for your answers.
Ouail.