I use this method to get xml for RssFeed, but I try to output the variable $feedContent, there is a error follwing like this:
System.Net.WebException: The remote server returned an error: (500) Internal Server Error. at System.Net.HttpWebRequest.GetResponse() at umbraco.library.GetXmlDocumentByUrl(String Url)
I don't know what's the reason, I notice the content of url includes image tags, I'm not sure if that is the reason.
GetXmlDocumentByUrl
<xsl:variable name="feed" select="http://www.fx678.com/news/rss/news.xml"/>
<xsl:variable name="cacheRate" select="number(1800)"/>
<xsl:variable name="feedContent" select="umbraco.library:GetXmlDocumentByUrl($feed, number($cacheRate))"/>
<xsl:value-of select="$feedContent"/>
I use this method to get xml for RssFeed, but I try to output the variable $feedContent, there is a error follwing like this:
System.Net.WebException: The remote server returned an error: (500) Internal Server Error. at System.Net.HttpWebRequest.GetResponse() at umbraco.library.GetXmlDocumentByUrl(String Url)
I don't know what's the reason, I notice the content of url includes image tags, I'm not sure if that is the reason.
Hope someone could help me out, thanks very much.
Hi Michael,
It appears that the RSS feed isn't valid XML - hence the server error.
Run it against the W3C validation service to see the errors:
http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fwww.fx678.com%2Fnews%2Frss%2Fnews.xml
Are you in control of the RSS feed? or is it a 3rd-party service?
I'm not too sure how you can fix it (if the RSS feed is out of your control).
Cheers,
- Lee
is working on a reply...