I am new to cfc/xml. When I tried to create a simple cfc function that returns 
an xml object and tried to call it in a cfm page, the page returned some weird 
strings instead of the string I put in the testing xml. Can anyone help me 
correct errors? Thanks. The code is below:

cfc:
<cfcomponent>
  <cffunction name="simpleXml" access="public" returntype="xml">
    <cfxml variable="xmlobject">
      <test>this is a test</test>
    </cfxml>
    <cfreturn xmlobject>
  </cffunction>
</cfcomponent>

cfm:
<cfobject name="myCFC" component="testcfc">
<cfset testxml= myCFC.simpleXml>
<cfoutput>#toString(testxml)#</cfoutput>


the weird string that is returned is something like this:
textxml [EMAIL PROTECTED]


thanks again

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:209096
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to