public bool OpenUrl(String _sUrl) { pdamxUrlReader mxUrlReader; if (_sUrl == null) { return(false); } if (_sUrl.Trim().Length == 0) { return(false); } try { mxUrlReader = new pdamxUrlReader(_sUrl); sXMLString = mxUrlReader.OpenUrl(); OpenString(sXMLString); } catch (Exception e) { Console.WriteLine("pdamxXMLReader:OpenUrl() - " + e.Message); return(false); } return(true); }
public InternetFeeds() { XPathNodeIterator xpathINode; pdamxUrlReader mxUrlReader = new pdamxUrlReader(); String sRSSExt; String sFeedDirectory; sRSSExt = GetSettings("/Feeds/RSS/RSSExtension"); sFeedDirectory = GetSettings("/Feeds/RSS/RSSFeedDirectory"); xpathINode = SettingsObject.GetNodePath("/Feeds/RSS/*"); while (xpathINode.MoveNext()) { if (xpathINode.Current.Name.Equals("Feed")) { String sFileName = ""; String sUrl = ""; xpathINode.Current.MoveToFirstChild(); do { if (xpathINode.Current.Name.Equals("Name")) { sFileName = sFeedDirectory + xpathINode.Current.Value + "." + sRSSExt; } if (xpathINode.Current.Name.Equals("Url")) { sUrl = xpathINode.Current.Value; } }while (xpathINode.Current.MoveToNext()); xpathINode.Current.MoveToParent(); mxUrlReader.Url = sUrl; mxUrlReader.WriteToFile = sFileName; mxUrlReader.OpenUrl(); } } }