javascript - 如何在没有 id 或类的 html 网页中定位元素的值(在 WPF c# 应用程序中使用)
问题描述
我想在属于无线网络无线电的本地 html 网页中获取 div 元素的值(在代码中:x)。这个 div 没有 id 或 class 或属性。我如何在 c# Windows Presentation Foundation 中做到这一点?(值不固定)。我在过去几天搜索了很多。我知道也许最好的方法是使用 html 敏捷包来定位该特定行或索引页面中的所有 div 并通过它的索引找到这个。这是该 html 页面的一部分:
<td rowspan="1">Link Capacity
<div class="help">header=[Link Capacity]....</div>
</td>
<td>
<div>x</div>
</td>
我只需要抓住 x 这是一个数字。此外,class="help" 在页面中被多次使用。“Link Capacity”或“header=[Link Capacity]”在代码中使用一次。也许他们是这个解决方案的关键。
解决方案
推荐阅读
- xcode - 如何在 bazel 项目中添加 tensorflow?
- android - 如何从所有 UserID (UID) 中获取特定值并保存在 RecyclerViewFirebaseUI
- java - 我想在一个类 MainActivity.java 上使用多个布局屏幕。用户可以在按下开关按钮时将一种布局更改为另一种布局
- r-markdown - 如何在 rmarkdown 的 knitr 输出中控制带有图像的标题下的行?
- javascript - 使用 Sinon 存根类方法的问题
- mongodb - MongoDB双重查询
- sql-server - 使用 Order by 更新查询,同时防止两个用户更新同一行
- google-cloud-bigtable - bigtable 中有什么替代 hbase bulkload
- image-stitching - NNDR 类型错误的自定义 DMatch 对象?
- excel - Excel - 仅在括号内有条件地格式化文本