http://sph.umd.edu/news/blog2.cfm

I am recreating a blog.  I am able to read in several xml files and  
populate the content.  To do this, I copied code from other  
functionality and it's using CFHTTP.   In the blog's functionality,  
I'm supposed to be able to click on the title of a posting to bring  
it up by itself, instead of with all the other posts.  I am having a  
problem only for that bit of functionality.  When I load a page the  
first  time and click on a posting, I receive the error:
Error "An error occured while Parsing an XML document.  Content is  
not allowed in prolog."

If I then refresh the page that gave the error, it then loads fine -  
just not the first time.  The other times that I read in content,  
this doesn't happen.   I can go to other pages to find this error too  
by clicking on one of the archive months to the right.  That allows  
me to reproduce the error more often.

Here's the code that I'm using

<cfhttp url="http://sphumd.blogspot.com/feeds/posts/default/ 
#url.postID#" resolveurl="no" timeout="120" />
<cfset XMLText = cfhttp.fileContent />
<cfset nodeToReplace = mid(XMLText, 1, evaluate(find("?>", XMLText) +  
1))>
<cfset XMLText = replaceNoCase(XMLText, nodeToReplace, "", "ALL")>
<cfset parsed = XMLParse(XMLText)>

The error is stating that it's having problems with the last line.   
This code is the same code that works on all the other times that I  
read in the data.

-- 

Daniel Kessler

University of Maryland College Park
School of Public Health
3302E SPH Building
College Park, MD  20742-2611
Phone: 301-405-2545
http://sph.umd.edu





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316285
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