Modify HTML file in a c sharp class

后端 未结 4 927
Happy的楠姐
Happy的楠姐 2021-01-20 21:17

First of all my application is not a web application. My aim is reading html files and modify them.

So that I write this code:

    string fileName =         


        
4条回答
  •  难免孤独
    2021-01-20 21:54

    Get position of start and end index of section_1

    stringIndex =StringNthOccFinder.IndexOfNth(HtmlSting, "", 0, 14);
    

    get HTML section which you want to remove

      HtmlSection= result.Substring(stringIndex , endIdex - stringIndex );
    

    Replace html section to ""

       result = result.Replace(HtmlSection, "");
    

提交回复
热议问题