Exemplo n.º 1
0
        public List <RssLink> GetLinkList()
        {
            List <RssLink> links = new List <RssLink>();
            XmlDocument    doc   = new XmlDocument();

            doc.Load("RssLinks.xml");

            XmlNode     rootNode  = doc.SelectSingleNode("links");
            XmlNodeList linknodes = rootNode.ChildNodes;

            foreach (XmlNode linknode in linknodes)
            {
                string title       = linknode.SelectSingleNode("title").InnerText;
                string uri         = linknode.SelectSingleNode("uri").InnerText;
                bool   defaultshow = bool.Parse(linknode.SelectSingleNode("defaultshow").InnerText);

                RssLink linkItem = new RssLink(title, uri, defaultshow);
                links.Add(linkItem);
            }
            return(links);
        }
Exemplo n.º 2
0
        public List<RssLink> GetLinkList()
        {
            List<RssLink> links = new List<RssLink>();
            XmlDocument doc = new XmlDocument();
            doc.Load("RssLinks.xml");

            XmlNode rootNode = doc.SelectSingleNode("links");
            XmlNodeList linknodes = rootNode.ChildNodes;

            foreach (XmlNode linknode in linknodes)
            {
                string title = linknode.SelectSingleNode("title").InnerText;
                string uri = linknode.SelectSingleNode("uri").InnerText;
                bool defaultshow = bool.Parse(linknode.SelectSingleNode("defaultshow").InnerText);

                RssLink linkItem = new RssLink(title, uri, defaultshow);
                links.Add(linkItem);

            }
            return links;
        }