【发布时间】:2012-08-06 14:47:03
【问题描述】:
我正在使用这个 xpath 表达式 //*[@id='info_box']/p[contains(., 'Drafted')] 作为输出:http://pastebin.com/kRmCadiw(原始格式的原始输出)
我想要的是获取最后一个 <br> 之后的所有文本,所以我使用了:data(tokenize(//*[@id='info_box']/p[contains(., 'Drafted')], '\s*<br\s*/?>\s*')[last()]) 但它仍然在 <p> (count(...)=1) 中给出全文,即使尝试用简单的'
'...我不明白缺少什么!
预期输出为:Drafted by the San Francisco 49ers in the 2nd round (33rd overall) of the 2005 NFL Draft.
【问题讨论】:
标签: xml xpath xquery tokenize line-breaks