Hi friends! I need some help!
I'm creating an XML file with the code:
g_ixml = cl_ixml=>create( ). g_document = g_ixml->create_document( ). lote = g_document->create_simple_element( name = 'NF' parent = g_document ). nfnum = g_document->create_simple_element( name = 'nfnum' value = '999999999' parent = lote ). * Creating a stream factory and streams g_streamfactory = g_ixml->create_stream_factory( ). g_encoding = g_ixml->create_encoding( character_set = c_encoding byte_order = if_ixml_encoding=>co_little_endian ). * Rendering into a table-based stream g_ostream = g_streamfactory->create_ostream_itable( xml_table ). g_ostream->set_encoding( encoding = g_encoding ). g_renderer = g_ixml->create_renderer( ostream = g_ostream document = g_document ). g_rc = g_renderer->render( ). * use only the first xml_size bytes of the xml table!! xml_size = g_ostream->get_num_written_raw( ). data: v_file type string. concatenate 'C:\' 'FUL01' '.txt' into v_file. call method cl_gui_frontend_services=>gui_download EXPORTING bin_filesize = xml_size filename = v_file filetype = 'BIN' CHANGING data_tab = xml_table.
It's worked, but all tags is writed in same line:
<?xml version="1.0" encoding="utf-8"?><NF><nfnum>999999999</nfnum></NF>
So, I want something like:
<?xml version="1.0" encoding="utf-8"?> <NF> <nfnum>999999999</nfnum> </NF>
How can I do this?
Thanks for any help!