为什么我收到错误消息“element”未处理”使用 Geo::KML 解析 KML 时?

发布于 2024-11-06 09:28:29 字数 434 浏览 2 评论 0原文

use Geo::KML;
my $data = Geo::KML->readKML("test1.kml");

use Data::Dumper;

$Data::Dumper::Indent = 1;
print Dumper $data;

我正在使用此代码,并且 test1.kml 文件可从 http://pastebin.com/ 获取LbzwLYLc。我收到此错误:

error: element `{http://www.opengis.net/kml/2.2}Document' not processed at {http://www.opengis.net/kml/2.2}kml
use Geo::KML;
my $data = Geo::KML->readKML("test1.kml");

use Data::Dumper;

$Data::Dumper::Indent = 1;
print Dumper $data;

I am using this code and the test1.kml file is available from http://pastebin.com/LbzwLYLc. I am getting this error:

error: element `{http://www.opengis.net/kml/2.2}Document' not processed at {http://www.opengis.net/kml/2.2}kml

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

定格我的天空 2024-11-13 09:28:29

如果 Pastebin 是您正在解析的完整内容,则可能是因为您缺少 结束标记。这可能与错误消息一致(尽管我希望它引用文件夹) - 那么下面的文档/文件夹元素不会被处理(因为它没有关闭)。

If the pastebin is the full contents of what you are parsing, it might be because you are missing closing </Folder> and </kml> tags. This might be consistent with the error message (though I'd expect it to refer to Folder) - then the Document/Folder element under is not processed (because it isn't closed).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文