System.Collections.Generic.List <RedirectRule> GetRules() { System.Collections.Generic.List <RedirectRule> col = new List <RedirectRule>(); System.Xml.XmlNode _oRules = oDoc.SelectSingleNode("//urlrewrites"); foreach (System.Xml.XmlNode oNode in _oRules.SelectNodes("rule")) { if ((oNode.SelectSingleNode("url/text()") != null) && (oNode.SelectSingleNode("rewrite/text()") != null)) { RedirectRule oR = new RedirectRule(); oR.Name = oNode.Attributes["name"].Value; oR.URL = oNode.SelectSingleNode("url/text()").Value; oR.Rewrite = oNode.SelectSingleNode("rewrite/text()").Value; col.Add(oR); } } return(col); }
System.Collections.Generic.List<RedirectRule> GetRules() { System.Collections.Generic.List<RedirectRule> col = new List<RedirectRule>(); System.Xml.XmlNode _oRules = oDoc.SelectSingleNode("//urlrewrites"); foreach (System.Xml.XmlNode oNode in _oRules.SelectNodes("rule")) { if ((oNode.SelectSingleNode("url/text()") != null) && (oNode.SelectSingleNode("rewrite/text()") != null)) { RedirectRule oR = new RedirectRule(); oR.Name = oNode.Attributes["name"].Value; oR.URL = oNode.SelectSingleNode("url/text()").Value; oR.Rewrite = oNode.SelectSingleNode("rewrite/text()").Value; col.Add(oR); } } return col; }