从HTML元素生成一个xPath
2023-06-27 13:53 更新
提示: [编写HTML和数据]
标签: 编程
提示词
以下提示词帮助你实现:从HTML元素生成一个xPath
Generate an Xpath for a given [html element], assuming I want to get this [result].
Note, however, that the [result] must not be written in xpath.
Consider that there can be several elements by Xpath. In this case, return all of them.
For example, for this html <a _ngcontent-client-app-c261="" rel="nofollow noopener noreferrer" role="link" class="component--field-formatter link-accent ng-star-inserted" href="http://www.pinpointe.com" rel="external nofollow" target="_blank" target="_blank" title="www.pinpointe.com" aria-label="www.pinpointe.com"> www.pinpointe.com <icon _ngcontent-client-app-c261="" size="custom" key="icon_new_tab" color="inherit" class="external-icon ng-star-inserted"><svg viewBox="0 0 24 24" class="custom inherit"><path d="M0 0h24v24H0z" fill="none"></path><path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path></svg></icon><!----><!----><!----></a> I want to get www.pinpointe.com and right xpath will be - //a[@class='component--field-formatter link-accent ng-star-inserted']/text()
All output shall be in [TARGETLANGUAGE].
[PROMPT]
使用提示: 从网站的HTML内容中获取XPath表达式。
← 智能家居