it looks like you're still parsing the cfhttp.filecontent variable. You should be parsing variables.filecontent since that's the modified value with only ascii data.
<cfscript> URLToPull = "http://www.easycfm.com/syndication/mostviewed.cfm"; </cfscript> <cfhttp url="http://www.easycfm.com/syndication/mostviewed.cfm" method="GET" timeout="15" proxyserver="ipaddress" proxyuser="username" proxypassword="password" proxyport="port" resolveurl="yes"> </cfhttp> <cfset variables.filecontent = REReplaceNoCase ( cfhttp.filecontent, "[^\x00-\x7f]", "", "ALL" ) /> <cfscript> XMLContent = trim(variables.filecontent); XMLContent = XMLParse(XMLContent); </cfscript> On 8/22/06, Ian Vaughan <[EMAIL PROTECTED]> wrote: > Hi > > I have tried your suggestion but am still getting the error which is > shown below. Could it be a setting on the CF 7.0 server that is causing > this? > > ------------------ > An error occured while Parsing an XML document. > White spaces are required between publicId and systemId. > > The error occurred in F:\xmlrss.cfm: line 15 > > 13 : <cfscript> > 14 : XMLContent = trim(cfhttp.filecontent); > 15 : XMLContent = XMLParse(XMLContent); > 16 : </cfscript> > 17 : </head> > > ------------------- > This is the code I am using > > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" > /> > <title>XML / RSS Feeds</title> > <cfscript> > URLToPull = "http://www.easycfm.com/syndication/mostviewed.cfm"; > </cfscript> > <cfhttp url="http://www.easycfm.com/syndication/mostviewed.cfm" > method="GET" > timeout="15" proxyserver="ipaddress" proxyuser="username" > proxypassword="password" proxyport="port" resolveurl="yes"> > </cfhttp> > <cfset variables.filecontent = REReplaceNoCase ( cfhttp.filecontent, > "[^\x00-\x7f]", "", "ALL" ) /> > <cfscript> > XMLContent = trim(cfhttp.filecontent); > XMLContent = XMLParse(XMLContent); > </cfscript> > </head> > > <body> > <cfoutput> > > Feed provided by:<BR> > <a href="#XMLContent.rss.channel.image.link.xmlText#"> > <img src="#XMLContent.rss.channel.image.url.xmlText#" > alt="#XMLContent.rss.channel.image.title.xmlText#" border="0"> > </a><br> > #XMLContent.rss.channel.title.xmlText#<BR> > #XMLContent.rss.channel.description.xmlText#<BR><BR> > </cfoutput> > > <cfloop from="1" to="#ArrayLen(XMLContent.rss.channel.item)#" > index="idx"> > <hr> > <cfoutput> > <a > href="#XMLContent.rss.channel.item[idx].link.xmlText#">#XMLContent.rss.c > hannel.item[idx].title.xmlText#</a><BR> > > #ParagraphFormat(ReplaceNoCase(XMLContent.rss.channel.item[idx].descript > ion.xmlText, "<", "<", "ALL"))# > Author: #XMLContent.rss.channel.item[idx].author.xmlText#<BR> > Date: #XMLContent.rss.channel.item[idx].pubDate.xmlText# > </cfoutput> > </cfloop> > <HR> > <cfoutput><div > align="center">#XMLContent.rss.channel.copyright.xmlText#</div></cfoutpu > t> > </body> > </html> > > -----Original Message----- > From: Rob Wilkerson [mailto:[EMAIL PROTECTED] > Sent: 22 August 2006 13:05 > To: CF-Talk > Subject: Re: Parsing an XML Feed > > Ian, > > I've seen feeds that contain non-printing characters that can throw off > the XML parsing. For the sake of investigation, try adding this line > before you try to parse the XML: > > <cfset variables.content = REReplaceNoCase ( variables.content, > "[^\x00-\x7f]", "", "ALL" ) /> > > This will remove all non-ascii characters from your feed. Not a good > thing for general purposes, but it might help you debug. See if that > makes any difference and then we can go from there. > > On 8/22/06, Ian Vaughan <[EMAIL PROTECTED]> wrote: > > I have tried adding resolveurl = "yes" but the error message stays the > > > same ? > > > > I have also tried different rss feeds from other websites and am > > getting the same error. > > > > Perhaps Coldfusion MX 7 cannot consume rss feeds so they can display > > on your website, could it be a limitation of Coldfusion? If that is > > the case then I will have to look at php to consume the feeds. > > > > > > An error occured while Parsing an XML document. > > White spaces are required between publicId and systemId. > > > > The error occurred in F:\xmlrss.cfm: line 14 > > > > 12 : </cfhttp> > > 13 : > > 14 : <cfset fileContent = xmlparse(#cfhttp.fileContent#)> > > 15 : </head> > > 16 : > > > > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250605 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

