Write output to a file using a template
Nov 30, 2011 at 11:43am UTC
Hello,
is there a library or an implementation available to write some information into a file using a template.
For example:
Let's say I would like to write some contact details.
Template:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<html>
<body>
<table>
<tr>
<td>
$name
</td>
<td>
$phone
</td>
<td>
$email
</td>
</tr>
<table>
</body>
</html>
In the output file I would expect the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<html>
<body>
<table>
<tr>
<td>
Mat
</td>
<td>
+123456789
</td>
<td>
mat@email.com
</td>
</tr>
<table>
</body>
</html>
The example shows a HTML template and result. But I intend to use different output formats. Therefore I would like to use several templates, open them from my executable and generate the output.
Thanks,
Konstantin
Topic archived. No new replies allowed.