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

RemoveMetaElement() public method

public RemoveMetaElement ( string name ) : void
name string
return void
        public void RemoveMetaElement(string name)
        {
            foreach(XmlElement n in _dom.SafeSelectNodes("//head/meta[@name='" + name + "']"))
            {
                n.ParentNode.RemoveChild(n);
            }
        }

Same methods

HtmlDom::RemoveMetaElement ( string oldName, Func read, Action write ) : void

Usage Example

Example #1
0
 public void RemoveMetaValue_IsThere_RemovesIt()
 {
     var dom = new HtmlDom(
                   @"<html><head>
         <meta name='one' content='1'/>
         </head></html>");
     dom.RemoveMetaElement("one");
     AssertThatXmlIn.Dom(dom.RawDom).HasSpecifiedNumberOfMatchesForXpath("//meta[@name='one']", 0);
 }
All Usage Examples Of Bloom.Book.HtmlDom::RemoveMetaElement