Try using the <cfxml> tag to create your XML versus the <cfsavecontent> tag

----- Original Message -----
From: "S. Raley" <[EMAIL PROTECTED]>
To: "CF-Community" <[EMAIL PROTECTED]>
Sent: Monday, November 04, 2002 10:10 AM
Subject: CFXML Newbie. need Help Please


> Just trying to do a simple CFXML output....but the webpage just hangs and
doesn't error out or anything.. like its running in a never ending loop..The
code below is based on an example from the CFMX New Riders book..
>
>
> Here is my xsd:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- edited with XMLSPY v5 rel. 2 U (http://www.xmlspy.com) by SMR
(SMR) -->
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
elementFormDefault="qualified" targetNamespace="http://127.0.0.1:8500/";
> xmlns="http://127.0.0.1:8500/";>
> <xs:element name="document">
>     <xs:complexType>
>       <xs:sequence>
>   <xs:element name="doc_file_name" type="xs:string"/>
>   <xs:element name="doc_description" type="xs:string"/>
>   <xs:element name="doc_filesize" type="xs:string"/>
>     </xs:sequence>
>     </xs:complexType>
> </xs:element>
> </xs:schema>
>
>
> Here is my cfm:
>
> <cfquery name="getdoc" datasource="ncw" dbtype="ODBC">
> select doc_file_name, doc_filesize, doc_description from document
> </cfquery>
> Query Done...
>
>
> <cfsavecontent variable="tempxml"><?xml version="1.0" encoding="UTF-8"?>
> <doc-list xmlns:xsi="http://127.0.0.1:8500/"; xsi:
noNamespaceSchemaLocation="C:\CfusionMX\wwwroot\doc.xsd">
> <cfoutput query="getdoc">
> <document>
> <doc_file_name>#Trim(XMLFormat(doc_file_name))#</doc_file_name>
> <doc_description>#Trim(XMLFormat(doc_description))#</doc_description>
> <doc_filesize>#Trim(XMLFormat(doc_filesize))#</doc_filesize>
> </document>
> </cfoutput>
> </doc-list>
> </cfsavecontent>
> Save content done...
>
> <cfset myXMLDocument=XmlParse(tempxml)>
> This is my xml document
> <cfdump var="#myXMLDocument#">
>
> <cffile action="write" file="#ExpandPath(".")#/document.xml"
output="#ToString(tempxml)#">
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=5
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=5
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to