Hi
Don't really know how to categorise this request but I am looking for some kind of way to generate html files from text files that incorporating template/directives that will be auto filled by values stored in a db. It is a win forms app.
To give a very crude example.
File head.txt has say -
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<title>{{MY_TITLE}}[/color red]</title>
</head>
File body.txt has say -
<body>
{{MY_BODY}}[/color red]
</body>
File footer.txt has say -
</html>
I want to be able to read in head.txt identify the tag {{MY_TITLE}}[/color red] and replace it with a stored value.
Similarly for body.txt replace the {{MY_BODY}}[/color red] tags and footer.txt then write out a fully formed html file incorporated the values put in where the tags are.
I have seen several apps using this kind of thing so that end users can 'design' the html output from database apps but I have no idea how to do it or where to start looking.
Does anyone have any ideas?
Thanks
Kevin
Don't really know how to categorise this request but I am looking for some kind of way to generate html files from text files that incorporating template/directives that will be auto filled by values stored in a db. It is a win forms app.
To give a very crude example.
File head.txt has say -
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<title>{{MY_TITLE}}[/color red]</title>
</head>
File body.txt has say -
<body>
{{MY_BODY}}[/color red]
</body>
File footer.txt has say -
</html>
I want to be able to read in head.txt identify the tag {{MY_TITLE}}[/color red] and replace it with a stored value.
Similarly for body.txt replace the {{MY_BODY}}[/color red] tags and footer.txt then write out a fully formed html file incorporated the values put in where the tags are.
I have seen several apps using this kind of thing so that end users can 'design' the html output from database apps but I have no idea how to do it or where to start looking.
Does anyone have any ideas?
Thanks
Kevin