Make sure there are no characters after the cfcontent other than the
generated xml. This means no spaces or line breaks between cfcontent and
cfoutput.
Looks like you may have a space, but it might be the cftalk html formatting.
-----Original Message-----
From: Jeff Beer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 11, 2003 5:09 PM
To: CF-Talk
Subject: Outputting an XML Object to browser
[sorry for the dupe post - the original got chopped off at the line of
dashes]
Hi all,
Been searching and trying for quite some time and need a pointer or
two...
I've created an XML object from a query (using CFSAVECONTENT) and it
CFDUMPs just fine. Now I simply need to output that as XML to the
browser (or calling application). I keep getting:
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and
then click the Refresh button, or try again later.
--------
Invalid at the top level of the document. Error processing resource
'http://10.0.0.1/Admin/administrators/xml/reviews-api.cfm'. Line 1,
Position 1
[EMAIL PROTECTED]
^
Here's the output code I'm using currently:
(myDoc was created with CFSAVECONTENT)
<CFSETTING showdebugoutput="No">
<cfcontent type="text/xml" Reset="yes">
<cfoutput>#ToString(myDoc)#</cfoutput>
I've also tried creating myDoc with CFXML - same error result, and I've
tried this:
<cfset myXmlObj = XMLParse(myDoc)>
<!--- <cfdump var="#myxmlObj#"> --->
<CFSETTING showdebugoutput="No">
<cfcontent type="text/xml" Reset="yes"> <cfoutput>#myDoc#</cfoutput>
_____
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- Outputting an XML Object to Browser Jeff Beer
- Outputting an XML Object to Browser Jeff Beer
- Outputting an XML Object to browser Jeff Beer
- Re: Outputting an XML Object to browser Marlon Moyer
- RE: Outputting an XML Object to browser Jeff Beer
- RE: Outputting an XML Object to browser Steven Erat
- RE: Outputting an XML Object to browser Dave Watts
- RE: Outputting an XML Object to browser Jeff Beer
- RE: Outputting an XML Object to browser Tyler Silcox
- RE: Outputting an XML Object to browser Steven Erat
- RE: Outputting an XML Object to browser Andre Turrettini
- RE: Outputting an XML Object to browser Steven Erat