<div class="head-text">
<div class="body-text">
<div class="line1">
This is line one1
</div>
<div class="line2">
This is line one1
</div>
</div>
<div class="body-text">
<div class="line1">
This is line one2
</div>
<div class="line2">
This is line one2
</div>
</div>
<div class="body-text">
<div class="line1">
This is line one3
</div>
<div class="line2">
This is line one3
</div>
</div>
</div>
问题是我想单独检索文本。我尝试过使用循环,但我要么得到全部,要么只得到第一件事。
例如:如果我需要在循环中检索文本“This is line one2”,那么我应该怎么做?