예제 #1
0
        public void Compare(string e)
        {
            XmlDocument doc  = new XmlDocument();
            XmlDocument doc2 = new XmlDocument();

            doc2.Load("xml.xml");
            XmlNode nodeList;
            XmlNode root = doc2.DocumentElement;

            nodeList = root.SelectSingleNode("descendant::Feed[Title='" + e + "']/URL");
            var a   = nodeList.InnerText;
            var b   = FetchXml.DownloadXml(a);
            var c   = load.ReadXml(e);
            int old = c.GetElementsByTagName("item").Count;
            int rss = b.GetElementsByTagName("item").Count;

            Debug.WriteLine(old);
            Debug.WriteLine(rss);
            if (old < rss)
            {
                b.Save(@"..\XmlFeeds\" + e + ".xml");
            }
            else
            {
            }
        }
예제 #2
0
        public void Podcastlink(string Url, string cat, string interval, string nextupdate)
        {
            XmlHandler  xmlConection = new XmlHandler();
            XmlDocument podcastfeed  = FetchXml.DownloadXml(Url);
            var         name         = FeedName(podcastfeed);

            Podcastlink(name);
            var folder = CreateFolders.CreateXmlFolder();

            podcastfeed.Save(folder + @"\" + name + ".xml");
            if (File.Exists("xml.xml"))
            {
                xmlConection.writeToXml(name, Url, cat, interval, nextupdate, "No");
            }
            else
            {
                XmlHandler.createXml();
                xmlConection.writeToXml(name, Url, cat, interval, nextupdate, "No");
            }
        }