Dave,

I just tried this and it works fine for me:

<!--- Create XML Doc. --->
<cfxml variable="xmlData">
        <dude>
                <name>Ben Nadel</name>
        </dude>
</cfxml>

<!--- Get XML String (Including <?xml string). --->
<cfset strXmlData = ToString( xmlData ) />

<!--- Check XML string. --->
#HtmlEditFormat( strXmlData )#

<!--- Repase string from xmlDoc. --->
<cfxml variable="xmlCopy">#strXmlData#</cfxml>


,,,,,

Shouldn't this thrown an error? The ToString() method returns this:

<?xml version="1.0" encoding="UTF-8"?>
<dude>
                <name>Ben Nadel</name>
        </dude> 
<style>

Then, I pass that back into an CFXML tag (xmlCopy) and blam, no worries.



......................
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

 

-----Original Message-----
From: Dave Watts [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 01, 2006 5:21 PM
To: CF-Talk
Subject: RE: CFHTTP within CFC issue..

> I don't follow. Wouldn't CFHTTP.FileContent just contain an XML string

> (not an object)?

Yes. You can't put a string containing a well-formed XML document within
CFXML, because a well-formed XML document contains an XML declaration:

<?xml version="1.0" ... ?>

CFXML creates that for you, and won't work if you already have that. In
this case, there's no need to use CFXML, because you already have a
string you can feed directly to XMLParse if you want an XML document
object, or to CFOUTPUT if you want to output the string.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta, Chicago,
Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:258757
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to