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: 

Getting the source for an cl_xml_document

Former Member
0 Kudos

Cheers guys,

I need to access to plain XML source of the XML in an cl_xml_document. I understand that the function get_as_table should be doing that for me - however, I'm unsure what sort of table I should hand over to this function.

Using a table of string, I get hundreds of lines that contain truncated parts of the XML source, using a table of c the XML is not truncated, but I got lot's of bogus chars between the tags and at the beginning and end of the XML code.

So, any advice on what I'm doing wrong here would be nice.

1 ACCEPTED SOLUTION

athavanraja
Active Contributor
0 Kudos

use

l_xml is type ref to cl_xml_document

stream type sting

size type i.

l_xml->render_2_string(

exporting

pretty_print = 'X'

importing

  • RETCODE = RETCODE

stream = stream

size = size

).

4 REPLIES 4

athavanraja
Active Contributor
0 Kudos

use

l_xml is type ref to cl_xml_document

stream type sting

size type i.

l_xml->render_2_string(

exporting

pretty_print = 'X'

importing

  • RETCODE = RETCODE

stream = stream

size = size

).

0 Kudos

Unfortunalty, I can't find the specified method, maybe my version is too low (the code must stay compatible with 4.6C) - I'm working with an xml_stream_factory for now, works but it's a little tedious... thx anyway.

0 Kudos

my code is from was6.40

0 Kudos

Guessed so, thx anyway, should have specified the version in my initial post.