Skip to Content
0
Former Member
Apr 29, 2005 at 07:02 AM

XML file

13 Views

Hi all,

I have problem with XML file.

I create XML file on the application server use XML Library.

TYPES: begin of xml_line,

data(512) type X,

end of xml_line.

DATA: xml_table type table of xml_line.

document = g_ixml->create_document( ).

document->set_version( version = '1.0' ).

encoding = g_ixml->create_encoding( character_set = 'UTF-8' byte_order = 0 ).

document->set_encoding( encoding = encoding ).

.......

.......

.......

*-- create the stream factory

pStreamFactory = g_ixml->create_stream_factory( ).

*-- create an output stream for the table

pOStream = pStreamFactory->create_ostream_itable( table = xml_table ).

call method Document->render( ostream = pOStream ).

totalSize = pOStream->get_num_written_raw( ).

OPEN DATASET filename FOR OUTPUT IN BINARY MODE.

LOOP AT xml_table INTO wa_xml_table.

TRANSFER wa_xml_table-data TO filename.

ENDLOOP.

CLOSE DATASET filename.

I have the problems:

1) I created the xml file. At the end of this file are garbage, i.e. after final tag are garbage "</povidomlen> ADR_OBL_P /CEEIB/UAF_BP 000002000000".

2) In this file are symbols "¶" after a every 512 symbols.

Thanks a lot,

Igor