我的tag
如下:
<div class="popupContent">
<div class="gwt-HTML">
<h1 class="v-Notification-caption">Session Expired</h1>
<p class="v-Notification-description">
Take note of any unsaved data, and <u>click here</u> or press ESC key to continue.
</p>
</div>
</div>
需要使用简单的xpath
读取全文。
尝试使用以下:
//*[@class='v-Notification-description'][text()]
我只得到
"请注意任何未保存的数据,并且"
。我如何检索全文。
使用string()
函数,以从所选p
中的所有text()
节点和后代中产生计算的字符串值,在这种情况下为u
元素。
string(//*[@class='v-Notification-description'])