private void btnDownLoadURL_Click(object sender, EventArgs e) {/* * StreamWriter sr = new StreamWriter(@"D:\Projects\MSVS9\Programs\RSSFeeds.Bin\dddddddddddddddd.txt"); * sr.Write(DownloadWebPage("http://presata.xtreemhost.com/update/load_news.php")); * sr.Close();*/ XmlDocument doc = new XmlDocument(); doc.XmlResolver = null; // load the xml doc doc.Load(@"D:\Projects\MSVS9\Programs\RSSFeeds.Bin\dddddddddddddddd.txt"); // get an xpath navigator XPathNavigator navigator = doc.CreateNavigator(); NewsData NData = new NewsData(); // Get the links from the RSS feed XPathNodeIterator nodesLink = navigator.Select("//root"); while (nodesLink.MoveNext()) { // clean up the link XPathNodeIterator RNode = nodesLink.Current.SelectChildren(XPathNodeType.Element); // while (RNode.MoveNext()) { SetMessage(RNode.Current.Name + ": " + RNode.Current.Value); } } }
private void PrintWebResponse(string aAction, string aValue) { XmlDocument doc = new XmlDocument(); doc.XmlResolver = null; // load the xml doc doc.LoadXml(aValue); // get an xpath navigator XPathNavigator navigator = doc.CreateNavigator(); NewsData NData = new NewsData(); // Get the links from the RSS feed XPathNodeIterator nodesLink = navigator.Select("//root"); while (nodesLink.MoveNext()) { // clean up the link XPathNodeIterator RNode = nodesLink.Current.SelectChildren(XPathNodeType.Element); // while (RNode.MoveNext()) { SetMessage(LogMessageType.Event, RNode.Current.Name + ": " + RNode.Current.Value); } } }
private void btnDownLoadURL_Click(object sender, EventArgs e) { /* StreamWriter sr = new StreamWriter(@"D:\Projects\MSVS9\Programs\RSSFeeds.Bin\dddddddddddddddd.txt"); sr.Write(DownloadWebPage("http://presata.xtreemhost.com/update/load_news.php")); sr.Close();*/ XmlDocument doc = new XmlDocument(); doc.XmlResolver = null; // load the xml doc doc.Load(@"D:\Projects\MSVS9\Programs\RSSFeeds.Bin\dddddddddddddddd.txt"); // get an xpath navigator XPathNavigator navigator = doc.CreateNavigator(); NewsData NData = new NewsData(); // Get the links from the RSS feed XPathNodeIterator nodesLink = navigator.Select("//root"); while (nodesLink.MoveNext()) { // clean up the link XPathNodeIterator RNode = nodesLink.Current.SelectChildren(XPathNodeType.Element); // while (RNode.MoveNext()) { SetMessage(RNode.Current.Name +": "+ RNode.Current.Value); } } }