Bloom.Book.HtmlDom.RemoveXMatterStyleSheets C# (CSharp) Method

RemoveXMatterStyleSheets() public method

The chosen xmatter changes, so we need to clear out any old ones
public RemoveXMatterStyleSheets ( ) : void
return void
        public void RemoveXMatterStyleSheets()
        {
            foreach(XmlElement linkNode in RawDom.SafeSelectNodes("/html/head/link"))
            {
                var href = linkNode.GetAttribute("href");
                if(Path.GetFileName(href).ToLowerInvariant().EndsWith("xmatter.css"))
                {
                    linkNode.ParentNode.RemoveChild(linkNode);
                }
            }
        }