‎2009 Jul 24 3:06 AM
Hi all,
Given a string consist of string encoded in HTML. Any standard Function Module to remove the HTML code?
eg, Change "<HTML><B>Sample Text</B></HTML>" to "Sample Text"
Any suggestion/comments are welcome!
Thanks
Best regards,
Prakesh.
‎2009 Jul 24 3:50 AM
Hi Gupta, <li>Use HRDSYS_CONVERT_FROM_HTML function module. Thanks Venkat.O
‎2009 Jul 24 5:05 AM
Hi Prakesh,
To remove the HTML tags from a string, use the following sample formula:
whileprintingrecords;
stringvar sample := {table.stringfield};
numbervar counter := ubound(split(sample,"<"))-1;
numbervar i;
for i := 1 to counter do(
numbervar openbracket := instr(sample,"<");
numbervar closebracket := instr(sample,">");
sample := left(sample,openbracket-1) & mid(sample,closebracket+1));
sample;
====================
NOTE:
This formula removes all text between the '<' and '>' characters. Adjustments may be required if only some tags should be removed, or if the '<' or '>' characters appear by themselves in the original string.
====================
Thanks & Regards,
Sarita Singh Rathour
Edited by: Sarita Rathour on Jul 24, 2009 6:06 AM
Edited by: Sarita Rathour on Jul 24, 2009 6:07 AM
Edited by: Sarita Rathour on Jul 24, 2009 6:09 AM
‎2009 Jul 24 8:14 AM