to export some data i want to be able to generate an html output.
I have some co开发者_运维技巧nstant content to output, like html headers and footers.
My question is how to deal with that ? Do I have to embed some template (in a resource file) and parse it to make it dynamic ? Do I store my static content in some constant (is there a 255 char limit?) and append them while generating the dynamic content ?
Do you have some hints, useful links, or best practices to share?
Thanks
Use the Delphi TPageProducer. It generates HTML from a 'close to HTML' template which contains special tage. You respond to these tag in an event and replace them with your own data. Works a treat.
I've created a Delphi project that handles this issue also. I wanted to create a web-platform that uses Delphi-code in the same source-files as the HTML, much like other web-scripting platforms, but still compiles a library to run. (and auto-compiles on changes)
http://xxm.sf.net/
In its basic form it compiles into library that can be run by a handler for IIS (ISAPI extension), InternetExplorer (IInternetProtocol as its own URL scheme), or a stand-alone HTTP process. (Apache module and FireFix plug-in are on the way).
精彩评论