> 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>
I don't think you need to use ToString with something you create using
CFSAVECONTENT, although I don't see why it would screw things up either. I'd
recommend that you skip the CFSAVECONTENT, and use CFXML to create your
document, and use ToString to output your document.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
[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