2009 Feb 27 12:27 PM
Hi All,
I am having a requirement of displaying a HTML content(which is in internal table) in a text editor. Generally HTML content will have tags as shown below.
<html>
<head> <title>Sample</title> </head>
<body>
<basefont size=1>
<table border>
<tr> <th>Bengaluru<th> </tr>
<tr> <th>Pune<th> </tr>
<tr> <th>Delhi<th> </tr>
<tr> <th>Goa<th> </table>
</body>
</html>
I have to display this content in text editor with out these tags as if it is shown when we open this document in browser. Awaiting replies
Thanks,
Ravee..
2009 Feb 27 12:32 PM
Hi Rave,
Try using this logic.
1. Read each line.
2. Consider offset for each line.
3.Increment each character and where you find '<' or '>' or '/' like that you can delete them before appending.
Hope it helps!
Much Regards,
Amuktha.
2009 Feb 27 12:32 PM
Hi Rave,
Try using this logic.
1. Read each line.
2. Consider offset for each line.
3.Increment each character and where you find '<' or '>' or '/' like that you can delete them before appending.
Hope it helps!
Much Regards,
Amuktha.
2009 Feb 27 12:42 PM
Hii Amuktha,
I am having your answer as one of the option with me.Thanks for your reply and i an awarding points for you even.
But My doubt is if we take following text in a text document and change the extension of file to HTML,we can open it in the browser. Then if we view the source then it shows following content it self.
Pune
Benagaluru
Delhi
Chennai
But in the other case,if we have following content in text do and if we open it in browser and view source it will be different. I think that makes the difference
<html>
<head> <title>Sample</title> </head>
<body>
<basefont size=1>
<table border>
<tr> <th>Raveendra<th> </tr>
<tr> <th>poothineedi<th> </tr>
<tr> <th>EDS an HP company<th> </tr>
<tr> <th>Vizag<th> </tr>
</table>
</body>
</html>
Please clarify..
Thanks,
Ravee
Edited by: ravee on Feb 27, 2009 6:13 PM
2009 Feb 27 12:46 PM
the commands in between <> are html tags and they help to format the output, so if u want to see only output without the tags use html container as mentioned in my previous post. it will be as if u are seeing it in ur browser.
кu03B1ятu03B9к
2009 Feb 27 12:54 PM
2009 Feb 27 12:35 PM
check this class
cl_gui_html_viewer.
check this piece of code given by rich in below mentioned thread u can modify it for ur use
* Load the HTML
lo_html->load_data(
exporting
type = `application`
subtype = `pdf`
IMPORTING
assigned_url = lv_url
CHANGING
data_table = lt_data
EXCEPTIONS
dp_invalid_parameter = 1
dp_error_general = 2
cntl_error = 3
OTHERS = 4 ).
* Show it
lo_html->show_url( url = lv_url in_place = 'X' ).
кu03B1ятu03B9к
Edited by: kartik tarla on Feb 27, 2009 6:05 PM