我正在使用htmlAgilityPack来解析一些html值 . 我加载文档,然后执行selectNodes(“/ html / body // a”),一切正常 . 但是,如果我为每个循环做一个像

对于htmlnodecollection.nodes中的每个htmlnode

htmlnode对象没有属性,只有标签中的文本 .

如果我使用项目索引(如htmlnodecollection(0))遍历htmlnodecollection,它将为我提供该对象的每个可能值 . 我宁愿为每个人做,但看起来我必须用整数来查找索引号来获取对象 .

这是它必须工作的方式还是我错过了什么?