我这个网站@herf节点存储的不是网址

2NI~{R%2_SUTHY_`{{{K6[9.png
0`1OVURL))M9]81595STAOE.png
网址后面的是@onclick节点中的数字,需要怎么拼接?
举报 使用道具
| 回复

共 1 个关于本帖的回复 最后回复于 2017-10-24 18:10

yangwenge 金牌会员 发表于 2017-10-24 18:10:42 | 显示全部楼层
1.使用substring-before()函数截取@onclick')'前面的部分
substring-before(.//*[@class='name']/a/@onclick,')')
2.使用
substring-after()函数截取第1步'('后面的部分
substring-after(substring-before(.//*[@class='name']/a/@onclick,')'),'(')
3.
使用concat()拼接
concat('http://member.wdzj.com/space-',
substring-after(substring-before(.//*[@class='name']/a/@onclick,')'),'('),'.html')
可以参考《xpath常用函数》

举报 使用道具
您需要登录后才可以回帖 登录 | 立即注册

精彩推荐

  • Gephi社会网络分析-马蜂窝游记文本分词并同
  • Gephi社会网络分析-基于马蜂窝游记文本以词
  • 知乎话题文本根据词语间距筛选后生成共词矩
  • 马蜂窝游记文本分词后以词语间距为筛选条件
  • 学习使用apriori算法挖掘关联关系

热门用户

GMT+8, 2024-3-29 02:36