gpt4 book ai didi

xml - 在xpath中挖出电子邮件地址

转载 作者:行者123 更新时间:2023-12-03 17:26:29 24 4
gpt4 key购买 nike

在下方,我尝试在ReportUser-7-0机械手强标签中找到电子邮件地址

<tr>
<td>
<span class="tablesaw-cell-content report-user">
<strong>ReportUser-7-0 Robot</strong>
<br/>
reportuser-7-0-1494492089@test.xxx.com
<br/>
SubInvestigator-2849
</span>
</td>
</tr>


但是,xpath

descendant::strong[contains(text(),'ReportUser-7-0 Robot')] and     contains(text(),'reportuser-7-0-1494492089@test.xxx.com') 


找不到。

我猜是因为它不驻留在强标签中-由于电子邮件不驻留在任何特定标签中,因此挖掘电子邮件的正确方法是什么?我尝试了跨度但没有喜悦。

最佳答案

尝试在XPath以下获取电子邮件值"reportuser-7-0-1494492089@test.xxx.com"

//strong[text()="ReportUser-7-0 Robot"]/following::text()[2]

关于xml - 在xpath中挖出电子邮件地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43913157/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com