Yeah, if you're using cfxml you can't use the ?xml directive. If you drop that you should be golden.
-- Josh ----- Original Message ----- From: "Andy Matthews" <[EMAIL PROTECTED]> To: "CF-Talk" <[email protected]> Sent: Friday, May 05, 2006 10:57 AM Subject: RE: saving an XML file into a variable with cfinclude > Yeah...I just found that actually, but it's not working either. Both of > them > give me this error: > "XML declaration may only begin entities." > > I suspect it might be because I've actually got the opening XML tag in the > XML file. This is what I'm including: > > <?xml version="1.0" ?> > <formHandler>2 > <config> > <to>[EMAIL PROTECTED]</to> > <from>[EMAIL PROTECTED]</from> > <subject>This is a test of my formMailer</subject> > <cc></cc> > <bcc></bcc> > <thanks>thanks.html</thanks> > <showallfields>Y</showallfields> > </config> > <formfields> > <field> > <label>First Name</label> > </field> > </formfields> > </formHandler> > > <!----------------//------ > andy matthews > web developer > certified advanced coldfusion programmer > ICGLink, Inc. > [EMAIL PROTECTED] > 615.370.1530 x737 > --------------//---------> > > -----Original Message----- > From: Josh Nathanson [mailto:[EMAIL PROTECTED] > Sent: Friday, May 05, 2006 12:51 PM > To: CF-Talk > Subject: Re: saving an XML file into a variable with cfinclude > > > I could be wrong but isn't that what the cfxml tag is for? > > -- Josh > > > ----- Original Message ----- > From: "Andy Matthews" <[EMAIL PROTECTED]> > To: "CF-Talk" <[email protected]> > Sent: Friday, May 05, 2006 10:32 AM > Subject: saving an XML file into a variable with cfinclude > > >> I'm taking a stab at writing a form creator/handler via XML. I want to >> make >> this really simple to use and setup so I don't want to use cffile to read >> the file as some people might not have access to that or know how to use >> it >> if they did. >> >> I've found that I can do this: >> <cfsavecontent variable="myXMLDoc"> >> <cfinclude template="xml.xml"> >> </cfsavecontent> >> >> And that will return the XML file as a string. But I need to get that >> into >> an XML object. I've tried XMLParse but that returns an error. I've also >> tried toString and a few other functions to no avail. >> >> Does anyone have any input on this? >> >> <!----------------//------ >> andy matthews >> web developer >> certified advanced coldfusion programmer >> ICGLink, Inc. >> [EMAIL PROTECTED] >> 615.370.1530 x737 >> --------------//---------> >> >> >> > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239679 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

