【发布时间】:2015-10-10 04:56:38
【问题描述】:
流程:
1.(好的)我下载了一个 json
2.(好的)我从包含 html
的 json 对象中解析一个值
3.(不行)我在 div.countries 中显示值
我的代码:
Dim webClient As New System.Net.WebClient
Dim result As String = webClient.DownloadString("http://example.com/countries.json")
Dim values As JObject = JObject.Parse(result)
Dim finalHTML As String = values.GetValue("countries_html")
finalHTML 变量基本上是这样的:
<div class="country_name">USA</div>
<div class="country_name">Ireland</div>
<div class="country_name">Australia</div>
我卡住了,不知道如何继续前进。 我需要遍历所有 div.country_name 并获取它的 inner_text 。希望这是有道理的。
【问题讨论】:
标签: json vb.net html-agility-pack