HTML Editor

I have developed a C++ class that allow my C++ programs to generate HTML files that are being updated as the program executes.

In order to do that, this class needs to get a HTML template file which have tokens in it. Each  token starts and ends with a delimiter (for example '$').

En example of such HTML template file is :

<html>
<head>
<title>New Page 4</title>
<
meta name="GENERATOR" content="Microsoft FrontPage 3.0">
</head>
<body>
<p>This is my name : $name$</p>
</body>
</html>

See the token $name$.

In this way, I can generate very complex HTML files using any HTML graphic editor.

The routines in the class needs to get :

  1. The name of HTML template file.
  2. The name of the output HTML file.
  3. The character of the delimiter
  4. An array of strings with the tokens names.
  5. An array of strings to replace with the tokens.

When the class routines are called with this information, they will read the HTML template file, search for the tokens and replace the tokens with the alternate strings while writing a new generated HTML file.

I am willing to share this code. let me know if you want it by email chaipi@tohu0.weizmann.ac.il