public static bool GetEnableHtmRewrite() { XmlDocument doc = SiteUrls.GetDoc(); XmlNode xmlNode = doc.SelectSingleNode("SiteUrls"); XmlAttribute xmlAttribute = xmlNode.Attributes["enableHtmRewrite"]; return(string.Compare(xmlAttribute.Value, "true", true) == 0); }
private static void UpdateHtmRewrite(string status) { XmlDocument doc = SiteUrls.GetDoc(); XmlNode xmlNode = doc.SelectSingleNode("SiteUrls"); XmlAttribute xmlAttribute = xmlNode.Attributes["enableHtmRewrite"]; if (string.Compare(xmlAttribute.Value, status, true) != 0) { xmlAttribute.Value = status; doc.Save(SiteUrls.GetSiteUrlsFilename()); } }