【发布时间】:2018-05-31 22:39:05
【问题描述】:
我对 XPath 并不十分熟悉,我需要实现以下目标:
假设我获得了 html 标签 id,并且我需要接收具有给定 id 的 html 元素的每个属性,除了 id,例如:
作为输入,我得到了id="test",
作为一个输出,我需要得到类似的东西:
"Key" = "some-randmom-attribute"=
"Value"="value-of-random-attribute";
"Key" = "some-randmom-attribute2"=
"Value"="value-of-random-attribute2";
我需要的是:
允许获取具有给定 id 的 html 标记的所有属性的查询,
干杯
【问题讨论】: