【发布时间】:2014-08-15 21:43:17
【问题描述】:
我正在尝试在 div 结束后直接插入一些我自己的 html。这个 div 里面还有其他的 div。
Dim HtmlNode As HtmlNode = HtmlNode.CreateNode("<span class=""label"">Those were the friends</span>")
Dim FriendDiv = htmldoc.DocumentNode.SelectSingleNode("//div[@class='profile_friends']")
Dim NewHTML As HtmlNode = htmldoc.DocumentNode.InsertAfter(HtmlNode, FriendDiv)
每次运行该代码时,我都会收到异常 Node "<div class="profile_topfriends"></div>" was not found in the collection
【问题讨论】:
标签: html .net vb.net html-agility-pack