Something like this will work:
<cfquery name="getEmployees" datasource="SampleApps">
select *
from tblEmp
</cfquery>
<cfxml variable="EmployeeDoc">
<employee>
<cfoutput query="getEmployees">
<name id="#strEmpID#">
<title>#strTitle#</title>
<first>#Strfname#</first>
<last>#Strlname#</last>
</name>
</cfoutput>
</employee>
</cfxml>
<cfdump var="#EmployeeDoc#">
Collin Tobin
CFMX QA Engineer
Macromedia�
What the web can be.(tm)
Announcing Macromedia DevNet Subscriptions
Maximize your power with our new premium software subscription for Macromedia
developers
Find out more: <http://www.macromedia.com/go/devnetsubs/>
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 9:41 AM
To: CF-Talk
Subject: Converting a recordset to XML
Hello,
I'm trying to figure out what is the best way to convert a recordset in
CFMX to XML. We're still using SQL 7.0, so we can not use the native XML
features of SQL Server 2000. Would it make sense to select the data like this:
Select '<title>' + title + ',</title> as title
from movies
Or is there a better way convert a record set to XML quickly? Are there any
plugins for SQL Server.
Brook Davies
logiforms.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4