// Read the RSS function LoadRSS
// The RssURl parameter is the RSS path
// The RssCount parameter indicates the number of RSS entries read.
Public string LoadRSS (string RssUrl, int RssCount)
{
XmlDocument doc = new XmlDocument ();
String Rss = "";
If (RssUrl! = "")
{
Try
{
Doc. Load (RssUrl );
XmlNodeList nodelist = doc. GetElementsByTagName ("item ");
XmlNodeList objItems1;
Int I = 0;
If (doc. HasChildNodes)
{
Foreach (XmlNode node in nodelist)
{
String title = "";
String link = "";
I + = 1;
If (node. HasChildNodes)
{
ObjItems1 = node. ChildNodes;
Foreach (XmlNode node1 in objItems1)
{
Switch (node1.Name)
{
Case "title ":
Title = node1.InnerText;
Break;
Case "link ":
Link = node1.InnerText;
Break;
}
If (title! = "" & Link! = "")
Break;
}
Rss + = "<a href = '" + link + "'target =' _ blank '>" + title + "</a> <br> ";
}
If (I> RssCount)
Break;
}
}
}
Catch (Exception)
{
Rss = "RSS Feed source data error! ";
}
}
Else
{
Rss = "No information source found. You can refresh and try again or contact the administrator! ";
}
Return Rss;
}