我正在尝试使用 Google 表格中的 =importXML 函数从以下来源提取几个元素:https://www.ibm.com/homepage_sitemap.xml
=IMPORTXML("https://www.ibm.com/homepage_sitemap.xml","//url[*]/loc")
它给我一个 N/A 错误。下面的图片是我想提取的内容。另外,每个 hreflang 值都使用了 href=,但我在第一次提取时被卡住了。
答案 0 :(得分:1)
您可以尝试使用此公式:
=IMPORTXML("https://www.ibm.com/homepage_sitemap.xml","//*[local-name() ='url']/*[local-name() ='loc']")
答案 1 :(得分:0)