文件名称:C#解析html类库NSoup.dll
文件大小:204KB
文件格式:DLL
更新时间:2022-11-13 16:58:43
C# NSoup.dll
C#解析html类库NSoup.dll 调用代码如下: string html = "<html><head><title>First!</title></head><body><p title='test'>First post!
</body></html>"; Document doc = NSoupClient.Parse(html); NSoup.Select.Elements ele = doc.GetElementsByTag("title"); string title = ""; foreach (var i in ele) { title = i.ToString(); } var Peles= doc.GetElementsByTag("p"); foreach (var item in Peles) { var t = item.Attr("title"); }