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

How to convert HTML to string?

0 Likes
6,970

I am using BTF editor it is generating the HTML. Can we convert the HTML  to  String and save it in standard text(Only the content with formatting ,not the HTML tags) or can we use the HTML directly to print it in ADOBE form.

5 REPLIES 5
Read only

raphael_almeida
Active Contributor
3,797

Hi Rasmi !

You can use the FM SOTR_TAGS_REMOVE_FROM_STRING for convert HTML on String, like example below:

DATA html TYPE string.


html = '<html><header><title>Convert Test</title></header><body>Converted</body></html>'.


CALL FUNCTION 'SOTR_TAGS_REMOVE_FROM_STRING'
CHANGING
   text = html.


The result is:


Convert Test   Converted


BR,

Read only

0 Likes
3,797

thank you so much for your reply

Read only

0 Likes
3,797

Hi Freinds,

i am using the BTF editor then i got the content of BTF editor as XSTRING.

Then i have converted the XSTRING to string and filtered the BODY of the HTML and got the string with some unknown characters.

Kindly suggest how to get the content from BTF editor with out any formating and dtore it in a standard text.

Thanks,

Rashmi

Read only

0 Likes
3,797

Hi Freinds,

i am using the BTF editor then i got the content of BTF editor as XSTRING.

Then i have converted the XSTRING to string and filtered the BODY of the HTML and got the string with some unknown characters.

Kindly suggest how to get the content from BTF editor with out any formating and dtore it in a standard text.

Thanks,

Rashmi

Read only

raphael_almeida
Active Contributor
0 Likes
3,797

Hi Rasmi!


As much as it seems that his recent posting has link with the initial doubt, believe that it open a new question in the community and end this.


Remember to follow the blog's instructions http://scn.sap.com/community/support/blog/2013/04/03/how-to-close-a-discussion-and-why


BR,