Chad,
Sure is....toString(templateXml) will turn your xml document into its
string equivalent. You can then store it in any database field of an
appropriate type (ntext, etc). Reading it back out, just use
xmlParse() to turn it back into an xml document.
Have a good one,
Joe
----- Original Message -----
From: Chad McCue <[EMAIL PROTECTED]>
Date: Wed, 4 Aug 2004 13:40:10 -0400
Subject: XML and Databases
To: CF-Talk <[EMAIL PROTECTED]>
this is my code
<CFXML VARIABLE="TemplateXML">
<templateemail>
<companyname>#session.FieldStructure["CompanyName"]#</companyname>
<messagetitle>#session.FieldStructure["Title"]#</messagetitle>
<logoImage>#session.FieldStructure["LogoImage"]#</logoImage>
<emailaddress>#session.FieldStructure["EmailAddress"]#</emailaddress>
<webaddress>#session.FieldStructure["WebAddress"]#</webaddress>
<comments>#session.FieldStructure["Comments"]#</comments>
<CFLOOP FROM="1"
to="#ArrayLen(session.FieldStructure['ProductInfo'])#"
index="LoopIndex">
<products>
<productname>#session.FieldStructure["ProductInfo"][LoopIndex]["ProductName"]#</productname>
<productdescr>#session.FieldStructure["ProductInfo"][LoopIndex]["ProductDescr"]#</productdescr>
<productpricelable>#session.FieldStructure["ProductInfo"][LoopIndex]["productpricelable"]#</productpricelable>
<productprice>#session.FieldStructure["ProductInfo"][LoopIndex]["productprice"]#</productprice>
<productimage>#session.FieldStructure["ProductInfo"][LoopIndex]["productimage"]#</productimage>
<productlinkmessage>#session.FieldStructure["ProductInfo"][LoopIndex]["productlinkmessage"]#</productlinkmessage>
<productlinkurl>#session.FieldStructure["ProductInfo"][LoopIndex]["productlinkurl"]#</productlinkurl>
</products>
</cfloop>
</templateemail>
</CFXML>
Is it possible to store "TemplateXML" into a database and then read
it out and be able to parse the XML?________________________________
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
- XML and Databases Chad McCue
- Re: XML and Databases Barney Boisvert
- Re: XML and Databases Chad McCue
- Re: XML and Databases Joe Rinehart
- Re: XML and Databases Barney Boisvert
- Re: XML and Databases Charlie Griefer
- Joe Rinehart