ColdFusion, Flex and XML - Funky Issue
So I've got this odd issue that I'm trying to narrow down...
My application is a ColdFusion back-end with a HTML, CSS and Flex front-end. The Flex application loads in appVars.cfm as "cfoutput" XML, uses those variables to then populate the correct company and user libraries and naturally load those xmlVideo.cfm, xmlImages.cfm, xmlText.cfm, etc.
Since the XML is not a raw XML file and is being generated with ColdFusion "cfoutput", I'm not sure if that is the reason why some people (I've never had an issue with it) do not see the list开发者_如何学JAVA that is supposed to be populated within Flex. A couple of questions come to mind:
1) Is there a prefered way to generate XML with ColdFusion other than just "cfoutput"?
2) Once the XML is visible to Flex, could there potentially be an issue with loading generated XML within a .cfm as opposed to a raw XML file?
3) Does Flex possibly handle this different from browser to browser, OS to OS?
1.) usually construct the xml in xml object, then <cfoutput>#toString(xmlObj)#</cfoutput>
. See: http://livedocs.adobe.com/coldfusion/8/htmldocs/XML_09.html#1205230
2.) shouldn't matter. Might want to return the correct content type in HTTP header though, and try to eliminate white spaces in front using
<cfsetting enableCFoutputOnly = "yes">
<cfheader name="Content-type" value="text/xml">
<cfoutput>#toString(xmlObj)#</cfoutput>
3.) Theoretically, the XML engine is part of the Flash runtime and it should behave the same across browser / OS.
精彩评论