使用HtmlAgilityPack将HTML转换为字符串

时间:2013-08-19 01:42:16

标签: html vb.net string document

我已经用HTML将字符串解析为HtmlAgilityPack.HtmlDocument,但我似乎无法将其转换回字符串。

    Dim Document As HtmlAgilityPack.HtmlDocument = New HtmlAgilityPack.HtmlDocument()
    Document.LoadHtml(Result)

1 个答案:

答案 0 :(得分:3)

你可以使用InnerHTML

Dim html As String
html = Document.DocumentNode.InnerHTML