【发布时间】:2017-12-26 21:24:22
【问题描述】:
我无法从 href 属性中获取 URL。 我用这个代码
Dim url As String = "http://example.com/"
Dim web As New HtmlWeb()
Dim doc As HtmlDocument = web.Load(url)
For Each item As HtmlNode In doc.DocumentNode.SelectNodes("//a/@href")
If Not item Is Nothing Then
Response.Write(item.OuterHtml)
End If
Next
但它不起作用。
【问题讨论】:
标签: vb.net xpath html-agility-pack