我正在抓取表格的内部文本,但此列有工具提示,HTMLAgilityPack 函数会完全抓取工具提示和准确数据。
假设我只想要他们的名字,并且在包括它自己之前我不需要所有的单词
。我可以知道如何实现这一目标吗?
Antony Jenkins held the position of CEO at Barclays at the time of this trade. Antony Jenkins
Frits Van Paasschen held the position of Non-Executive Director at Barclays at the time of this trade. Frits Van Paasschen
David A Walker held the position of Non-Executive Chairman at Barclays at the time of this trade. David A Walker
我尝试使用cols6[j].InnerText.Replace (" ", "")
,但它显然不会删除它前面的那些单词,除了
它自己。
任何帮助将非常感激!谢谢!
根据 Alexei 的要求,HTML 表格如下:
<tr><th>Trade Date</th><th>Action</th><th>Notifier</th><th>Price</th><th>Currency</th><th>Amount</th><th>Holding</th></tr>
<tr class="on"><td>13-Dec-13</td><td>Scrip Dividend</td><td><div class="TradesInfo"><img onmouseover="$('#TradePopD0').css('visibility', 'visible');" onmouseout="$('#TradePopD0').css('visibility', 'hidden');" src="http://static.lse.co.uk/images/icons/info.png" width="14" height="14" align="left" alt="Trade Notifier Information for Barclays"><div class="TradesPop" id="TradePopD0">Antony Jenkins held the position of CEO at Barclays at the time of this trade.</div></div> Antony Jenkins</td><td>0</td><td></td><td>71</td><td>0</td></tr>
一切都很好,只是带有工具提示的列。