- 你想要找回
###
of <identifier>###</identifier>
from https://drive.google.com/uc?id=1AI2C8hQnSOuuoyJXizYBszGmpMXW8xxT&export=download
我可以像上面那样理解。如果我的理解是正确的,这个答案怎么样?
Issue:
在你的问题中,公式为=importXML("https://drive.google.com/uc?id=1AI2C8hQnSOuuoyJXizYBszGmpMXW8xxT&export=download","\\identifier")
uses \\identifier
作为 xpath。从您想要检索值的数据中,您似乎正在尝试检索###
of <identifier>###</identifier>
.
在这种情况下,为了Selects nodes in the document from the current node that match the selection no matter where they are
, //
需要使用而不是\\
。这可以在文档中看到here https://www.w3schools.com/xml/xpath_syntax.asp.
修改后的公式:
So =importXML("https://drive.google.com/uc?id=1AI2C8hQnSOuuoyJXizYBszGmpMXW8xxT&export=download","\\identifier")
可以修改如下。
=importXML("https://drive.google.com/uc?id=1AI2C8hQnSOuuoyJXizYBszGmpMXW8xxT&export=download","//identifier")
与其他 xpath 一样,根据您问题中的数据,您还可以使用以下 xpath/qgis/identifier
代替//identifier
。所以你也可以使用下面的公式。
=importXML("https://drive.google.com/uc?id=1AI2C8hQnSOuuoyJXizYBszGmpMXW8xxT&export=download","/qgis/identifier")
参考:
- 导入XML https://support.google.com/docs/answer/3093342
- XPath 教程 https://www.w3schools.com/xml/xpath_intro.asp