I have a simple template based system I wrote for use at work.
Basically it consists of a header, footer and a line which is repeated for each row in a database. (I actually store them as three separate fields in a template database.. you might have to store them as three separate files, perhaps filename.head, .foot and .rep ?)

In my code, I can do a simple string replace for a set of known tags (for example with hijack you could have tags like @title@, @artist@ etc...)

The header and footer can be used for table setup code as well as the page "branding".
It works quite well for me... =)

If you were to use HTML / XML style tags <mp3title> <artist> <album> then unrecognized tags wouldn't cause a problem with the output.

Just a few thoughts...
_________________________
Jazz (List 112, Mk2 42 gig #40. Mk1 4 gig #30. Mk3 1.6 16v)