Html Agility Pack - Remove element, but not innerHtml

后端 未结 10 2145
予麋鹿
予麋鹿 2021-01-06 11:46

I can easily remove the element just by note.Remove() lik this:

HtmlDocument html = new HtmlDocument();

html.Load(Server.MapPath(@\"~\\Site\\themes\\default         


        
10条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-06 12:00

    with regex you can do or you need to do with htmlagilitypack?

    string html = "";
    
    html = Regex.Replace(html, "", "", RegexOptions.Compiled);
    html = Regex.Replace(html, "", "", RegexOptions.Compiled);
    

提交回复
热议问题