0
敏捷新手在這裏。給定輸入文字:HtmlAgilityPack/XPath找到所有發生在特定標籤/下一個標籤之前
<html>
... Lots of html here...
<label class="list_item_title">Yes</label><br /><br />
<div class="list_item">
<div style="width:425px;" class="left"><a href="/xyz">HIT1</a> (2012)</div>
<div style="width:190px;" class="right"></div>
</div>
<div class="list_item">
<div style="width:425px;" class="left"><a href="/abc">HIT2</a> (2012)</div>
<div style="width:190px;" class="right"></div>
</div>
<label class="list_item_title">No</label><br /><br />
<div class="list_item">
<div style="width:425px;" class="left"><a href="/xyz">IGNORE</a> (2012)</div>
<div style="width:190px;" class="right"></div>
</div>
... Lots of html here...
</html>
我想獲得HIT1 & HIT2。
基本算法是標籤節點(類= 「list_item_title」)後,發現所有A的innerText屬性,其中的innerText = 「是」
完美。標籤之後的[1]是我錯過的 –