Hey all,
I have a situation where I want to duplicate an application written in
Java using CF.
The application uses XML documents as templates, and executes
functionality based on tags in the XML.
For instance, the XML template might look like this:
<page>
<article id="227" />
</page>
The Java app uses a SAX parser to parse the template, which fires off an
event for each tag.
When the parser sees the "page" tag, it runs the PAGE java class, which
goes off into the database and gets page info, etc. and spits out more
XML to the output stream.
Same for the article tag, which calls the ARTICLE class., etc.
How would one go about doing this in CF? I'm not sure there would be
any way to integrate a SAX parser into CF, so I'm not sure of how to do
this.
What I'd like to do is parse the template and execute CF custom tags for
each tag.
If I could rewrite the templates, I'd do something like:
<cf_page>
<cf_article id="227">
</cf_page>
and CFINCLUDE them into the page to get executed.
But, I can't rewrite the templates, and the templates come from the
database, not the filesystem.
Speed/efficiency is the primary motivation, so a RegExp replace, and
writing the file to the filesystem isn't really an option..
Any ideas?
Thanks in advance!
--
Edward Smith Internet Broadcasting System
Director of Architecture http://www.ibsys.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists