Thanks for your reply... the XML that i need to create will
be like this?
<emailMessage>
<messagetype>Welcome</MessageTpye>
<Subject>Welcome</Subject>
<MessageContent>
<![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" />
<title>test</title>
</head>
<body>
welcome to our site<br /> you are blah blah<br
/><br />
<p>blah blah</p>
<table><tr><td>whatever</td></tr></table>
</body>
</html>
]]>
</MessageContent>
</emailMessage>
The part thats in the CDATA are now indivual html files so i
want to take
the content of that html file and put it in the CDATA. i'm
not sure if
that's the best way to do it though... might be better to
store the HTML in
the DB and then write it out from there???
SUggestions?
"coffeedrinker56" <webforumsuser@macromedia.com> wrote
in message
news:flkopq$fhh$1@forums.macromedia.com...
> I'm not certain that I understand what you're asking.
Creating an XML file
from
> a database is pretty easy stuff so I'm undoubtedly
misunderstanding the
> question(?):
> <cfquery name="abc" ...>
> Exec myStoredProcedure #myparam1#, '#myparam2#'
> </cfquery>
> <cfxml var="abc">
> <page>
> <html>
> <head>
> <title>abc example</title>
> <link rel="stylesheet" type="text/css"
href="css/default.css" />
> <script language="javascript" type="text/javascript"
src="abc.js" />
> </head>
> <body>
> <form name="pageForm" method="post"
action="javascript:checkForm();">
> <table ...>
> </table>
> </form>
> </body>
> </html>
> </page>
> </cfxml>
>
> If you choose to do so, you can display the XML like:
> <cfoutput>#abc#</cfoutput>
>
> ... or you can save the XML on your server as a file
using CFFILE.
>
> If your intention is solely to display the XML, you can
also use ...
> <cfcontent type="text/xml"><?xml version="1.0"
encoding="UTF-8" ?><abc>
...
> </abc>
>
> ... instead of the <cfxml> and </cfxml>
tags.
>
> [I use the latter form when passing data back and forth
between the
server and
> the client.]
>
>