Application Development and Automation 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: 
Read only

Preserve whitespace in XML element value

Former Member
0 Likes
550

I am trying to add XML element with value prefix with white space:

ex_doc->create_simple_element(

name = 'VALUEPART1'

value = ' BQ/XWKB-99-5-9999-2'

parent = lo_ele_e1bpparex_bape_vbak ).

But when the XML is create, the white space is removed! How can I preserve the white space???

<VALUEPART1>BQ/XWKB-99-5-9999-2</VALUEPART1>

What i want is:

<VALUEPART1> BQ/XWKB-99-5-9999-2</VALUEPART1>

Appreciate for any help

2 REPLIES 2
Read only

Lukas_Weigelt
Active Contributor
0 Likes
387

Hi,

if you had been using XSLT instead, I would have said 'remove the strip-space element or alter it according to your needs'...

Please provide what class you are using, else it's too generic..

regards, Lukas

Read only

0 Likes
387

Hi

The class i am using is :

DATA: EX_DOC TYPE REF TO IF_IXML_DOCUMENT