can any one help me to convert a normal text document into a html template. I have around 50docs need to convert them into html templates and use those templates to generate html reports.
Thanks in advance,,chandras17--
Regarding this...
chandras17 wrote: ...can any one help me to convert a normal text document into a html template...
...it is not quite clear to me what you mean by "html template", but...
...one quick and simple way to display a text document in a browser is to surround the text by pre tags and give the document an "htm" extension...
...for example, suppose the file "Test.txt" contains the following...
This some sample text.
It is in a file.
The file is a plain text file.
...then, to view that file in a browser, one can simply copy the file, rename the copy to "Test.txt.htm", and change the contents to the following...
<pre>
This some sample text.
It is in a file.
The file is a plain text file.
</pre>
...and then load "Test.txt.htm" into a browser.
That is a simple way.
The case shown is simple; you do need to handle special characters. You can see some sample code in my "dirt-simple" code-viewer, (but you will have to download the code and pull it apart because it doesn't exactly fit your requirement), found at...
http://www.WebLogicArts.com/DemoList.aspx
HTH.
0 comments:
Post a Comment