ImportXML 不从 XML 文件返回数据
构建以下 xpath 查询
/eveapi/result/rowset/row[1]/@solarSystemName
我使用 xpath 检查器在以下 XML 文档上
: https:/ /api.eveonline.com/map/Sovereignty.xml.aspx
这适用于 Firefox 的 xpath 检查器添加,但是当我将其放入 Google Sheet 中的 importXML 查询中时,它不会返回任何数据:
=ImportXML("https://api.eveonline.com/map/Sovereignty.xml.aspx"; "/eveapi/result/rowset/row[1]/@solarSystemName")
有什么想法吗?
I used xpath checker to build the following xpath query:
/eveapi/result/rowset/row[1]/@solarSystemName
on the following XML document:
https://api.eveonline.com/map/Sovereignty.xml.aspx
This works in in xpath checker add on for Firefox however when i put it into a importXML query in Google sheet it does not return any data:
=ImportXML("https://api.eveonline.com/map/Sovereignty.xml.aspx"; "/eveapi/result/rowset/row[1]/@solarSystemName")
any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
显然属性名称必须全部小写。
这对我有用:
弄清楚这一点非常痛苦,当我意识到这就是我想拔掉头发的问题时,让我告诉你。
Apparently attribute names have to be all lower case.
This worked for me:
It was pretty painful figuring that out, and let me tell you when I realized that was the issue I wanted to pull out my hair.
URL 的行为很奇怪,因为它立即返回带有 currentTime 元素的 XML,并且仅在几秒钟后才会出现其余结果。
电子表格可能不会等待结束标记,也不会等待其余结果,并且不会返回任何内容。
如果您尝试运行,
您将看到 XML 的当前时间,因为它在结果之前返回。
The URL is behaving strangely as it returns immediately with a XML with currentTime element, and only after a few seconds the rest of the results are coming.
Probably the spreadsheet is not waiting for the closing tag nor to the rest of the results and returns nothing.
If you try to run
You will the current time of the XML as it is returning before the results.