【发布时间】:2021-11-09 01:35:08
【问题描述】:
我正在处理仅以如下所示格式存储 HTML href 标记的列。 href标签之外没有其他标签。
<a href='https://www.website1.ca/en/Section1/Section2/Section3/Section-4---Section5-R-Zone.pdf'>B4</a>
我正在尝试从 HTML 标记中提取链接:https://www.website1.ca/en/Section1/Section2/Section3/Section-4---Section5-R-Zone.pdf
我不确定要使用什么 Xpath 表达式。我尝试使用以下方法获取 HTML 属性中的值,但它似乎不起作用。
select
xpath(
'/href',
$$<a href='https://www.website1.ca/en/Section1/Section2/Section3/Section-4---Section5-R-Zone.pdf'>B4</a>$$,
'/@href'
);
是否有 xpath 表达式来获取 HTML 属性内的值?
【问题讨论】:
标签: html xml postgresql parsing xpath