1
我有兩個不同的錨標籤,因爲第二個不在錨文本或地址鏈接中包含單詞「Report
」。如何使用XPath識別細微差別的HTML錨定標記?
<a href="http://www.example.com/data/invoices/2010/10/invoices-report---tuesday-october-12.html">Invoices Report - Tuesday, October 12</a>
<a href="http://www.example.com/data/invoices/2010/10/invoices---tuesday-october-12.html">Invoices - Tuesday, October 12</a>
如何識別XPath的第一個鏈接並避免識別第二個鏈接?
好問題,+1。看到我的答案,兩個簡短的解決方案:) – 2010-10-17 17:02:57
嘗試此鏈接: http://stackoverflow.com/questions/915338/xpath-find-link-url-by-link-text – 2012-05-30 11:28:34