House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

cfheader breaks my xml

  << Previous Post |  RSS |  Tree View |  Sort Oldest First |  Subscribe to this Group Next >> 

cfheader breaks my xml

Hey Andy - Rob Wilkerson 04/05/2006 02:12 PM
Cheers back.  Judging by the sheer quantity of bangs, I assume that Rob Wilkerson 03/30/2006 09:28 AM
cheers rob!!!! Andy Jarrett 03/30/2006 09:20 AM
I'm not sure if this is relevant because I'm not sure how you're using Rob Wilkerson 03/30/2006 06:48 AM
Hi, Andy Jarrett 03/30/2006 06:43 AM

04/05/2006 02:12 PM
Author: Rob Wilkerson Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:45340#237036 Hey Andy - I just spent the better part of the day (I'm embarrassed to admit) debugging a problem I was having with one of my XML AJaX requests that used the code I included in this thread.  Although I looked at every other piece of code before I got there, it ended up being an omission in this code so I thought I'd update the list (and its archives) with what I found. Short version: I was trying to return XML for parsing via JavaScript. What I wasn't doing, though, was specifying the character set for that returning XML.  Once my returning XML contained so much as an accented "e" the functionality failed catastrophically. To save anyone else the time and frustration, this fixed the problem: <cfcontent type="text/xml; charset=UTF-8" reset="Yes" /> <cfoutput>     ...myXML... </cfoutput> Moral: Be smarter than I am and ALWAYS specify a character set. ----- Excess quoted text cut - see Original Post for more -----
03/30/2006 09:28 AM
Author: Rob Wilkerson Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:45340#236539 Cheers back.  Judging by the sheer quantity of bangs, I assume that <cfcontent> worked for you. ----- Excess quoted text cut - see Original Post for more -----
03/30/2006 09:20 AM
Author: Andy Jarrett Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:45340#236538 cheers rob!!!! ----- Excess quoted text cut - see Original Post for more -----
03/30/2006 06:48 AM
Author: Rob Wilkerson Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:45340#236531 I'm not sure if this is relevant because I'm not sure how you're using your XML, but I use <cfcontent> instead of <cfheader> and it works great: <cfcontent type="text/xml" reset="Yes" /> <cfoutput>      ...myXML... </cfoutput> ----- Excess quoted text cut - see Original Post for more -----
03/30/2006 06:43 AM
Author: Andy Jarrett Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:45340#236529 Hi, I'm having some trouble create a valid XML document using cfheader to change the page content. My simple file looks like this: xml.cfm <?xml version="1.0" encoding="UTF-8"?> <root>   <node>     <child>1</child>   </node> <root> I open this up and its valid. I know change the content type so the file is passed as XML: <cfheader name="Content-Type" value="text/xml"> <?xml version="1.0" encoding="UTF-8"?> <root>   <node>     <child>1</child>   </node> <root> This breaks the page. It seems that <cfheader> adds three blank lines to the top of the page. Has anyone else come across this problem? Cheers, Andy
<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference