からHREFのテキストを抽出:私はHTMLのこの部分を解析しようとしているHTMLドキュメント
私のような、ラベルのテキストを取得する方法を知りたい<div>
<p>
<a href="#" class="transcriptLink" onclick="seekVideo(0); return false;">A few years ago,</a>
<a href="#" class="transcriptLink" onclick="seekVideo(2000); return false;">I felt like I was stuck in a rut,</a>
<a href="#" class="transcriptLink" onclick="seekVideo(5000); return false;">so I decided to follow in the footsteps</a>
<a href="#" class="transcriptLink" onclick="seekVideo(7000); return false;">of the great American philosopher, Morgan Spurlock,</a>
<a href="#" class="transcriptLink" onclick="seekVideo(10000); return false;">and try something new for 30 days.</a>
</p>
</div>
:「数年前、 "<a href="#" class="transcriptLink" onclick="seekVideo(0); return false;">A few years ago,</a> "
<a href="#" class="transcriptLink" onclick="seekVideo(0); return false;">
<a href="#" class="transcriptLink" onclick="seekVideo(2000); return false;">
....................
のラベルに 『」
私は"<a> text </a>",
でテキストを取得することができますしかし、私は取得する方法がわからない』数年前に
はonclick="seekVideo(....);
良い質問、+1。 XPath式の評価が簡単なテキストを正確に生成するための簡単で簡単なXPath式については、私の答えを見てください。 –