1
<div id="studentInfo">
<p id="studentdetails">
<span>Placeofbirth:</span>
<span class="hidden" itemtype="http://xxxx.com" itemscope="">
<a itemprop="url" href="xxx.xom">
<span itemprop="title">Greg</span>
</a>
<span itemtype="http://xxxx1.com" itemscope="" itemprop="child">
<a itemprop="url" href="/c/san-diego/indpak">
<span itemprop="title">Greg is one of the Best student</span>
</a>
</span>
</span>
<span id="cat_display">
<a href="xxx.com"> Greg can be promoted </a>
</span>
Element studentname = doc.select("div p ").first();
當我這樣做:我正在 格雷格·格雷格是最好的學生格雷格可以促進之一。
我只想打印:當我做p 格雷格可以促進
看起來,並嘗試打印studentname.text() 它打印所有目前的案文,我一直在尋找一個特定的文本。
我該如何實現這一點。