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

Trailing Spaces on XML Nodes using IF_IXML

Former Member
0 Likes
541

I have created XML using IF_IXML. According to the schema, several of the elements have trailing spaces in the value for the element. I set the value with a string. For example,

move 'XXXXX ' to lv_string.

lv_rc element->set_value ( lv_string ).

In the rendering of the document to a string, the trailing spaces are omitted and the XML will not validate. Any suggestions would be appreciated.

Buster Hale

I have created XML using IF_IXML. According to the schema, several of the elements have trailing spaces in the value for the element. I set the value with a string. For example,

move 'XXXXX ' to lv_string.

lv_rc element->set_value ( lv_string ).

In the rendering of the document to a string, the trailing spaces are omitted and the XML will not validate. Any suggestions would be appreciated.

Buster Hale

1 REPLY 1
Read only

Former Member
0 Likes
456

Found the answer. Use ` instead of ' to set value of string.

data: lv_string1 type string value `ABC `,

lv_string2 type string value 'ABC '.

The length of lv_string1 is 5 and the length of lv_string2 is 3.