on 11-11-2003 5:25 PM
Hi,
for a multipart e-mail I want to convert HTML into plain text in ABAP. This means e.g. to remove the <tags> and replace <br>, <p> with CR/LF and more.
Do I have to reinvent this coding on my own or can I use something?
Thanks very much for any ideas!
Best regards,
Oliver
Hallo Oliver,
Probably in the end you will have to do some inventing yourself. Let me give some bits and pieces.
Probably as first step, put in the CR/LF sequences.
REPLACE ALL OCCURRENCES
OF ' sequences.
WHILE line CP '<>*'.
offset = sy-fdpos.
IF line CA '>'. ENDIF.
length = sy-fdpos + 1.
CONCATENATE line0(offset) linelength(*) INTO line.
ENDWHILE.
CONDENSE line.
However, I am not sure if you will be totally happy with such output. It is not bad. Have used it myself once before.
As final idea, consider an HTML encoding, just to be sure
line = CL_HTTP_UTILITY=>ESCAPE_HTML( line ).
bye, brian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.