Skip to Content
avatar image
Former Member

xml string in multiple lines

I have a string variable which holds an xml string.

I need to display it in a textedit control in webdynpro .

How can i split it across multiple lines to view it in text edit.

original string : <?xml version="1.0"?><test><test1>hello</test1></test>

"This is of type "STRING"

desired format :

<?xml version="1.0"?>






any pointers??

Message was edited by:

Priyank Jain

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Oct 10, 2007 at 11:45 AM

    Hi Priyank,

    You can either split it at '<' or '>' or use a regular expression for splitting it.

    Best regards,


    Add comment
    10|10000 characters needed characters exceeded

    • Hi Priyank,

      There are two ways:

      (a) You can bind the text edit ui element to a context attribute of type string_table. Each row in the internal table corresponds to a new line in the text edit. Since the split statement is able to place the result into an internal table, this might be the way of choice.

      (b) As an alternate solution you could use CL_ABAP_CHAR_UTILITIES=>LF. Simply concatenate this constant into your string at the places you would like to have a line break.

      Best regards,


  • avatar image
    Former Member
    Oct 10, 2007 at 12:58 PM



    go through this link hope this ll help you to solve your problem.'s%20Guide%20PDK%202.0%20for%20.NET/Reference/SAP.Web.UI.Controls.TextEdit.html

    reward point if helpful.



    Add comment
    10|10000 characters needed characters exceeded