【问题标题】:error parsing XML file to google maps (XML Parsing Error: junk after document element)将 XML 文件解析为谷歌地图时出错(XML 解析错误:文档元素后出现垃圾)
【发布时间】:2013-07-23 20:11:35
【问题描述】:

我的加载谷歌地图标记的 XML 文件有问题。该地图适用于某些邮政编码,但不适用于其他邮政编码。

这些是 xml 文件。这第一个工作正常。第二个没有。它给出了“XML Parsing Error: junk after document element”错误。

  1. www.soshapal.com/maptst.php?lat=45.5001031&lng=-73.57686610000002&radius=5km&country_id=2&city_id=30&section_id=2

  2. www.soshapal.com/maptst.php?lat=45.4932559&lng=-73.57964709999999&radius=5km&country_id=2&city_id=30&section_id=2

有人可以帮忙吗?

【问题讨论】:

    标签: php xml google-maps


    【解决方案1】:

    您的 XML 创建脚本正试图通知您错误:

    <br />
    <b>Warning</b>:  DOMElement::setAttribute() [<a href='domelement.setattribute'>domelement.setattribute</a>]: string is not in UTF-8 in <b>/home/vozemg0/public_html/soshapal.com/maptst.php</b> on line <b>44</b><br />
    <br />
    <b>Warning</b>:  DOMElement::setAttribute() [<a href='domelement.setattribute'>domelement.setattribute</a>]: string is not in UTF-8 in <b>/home/vozemg0/public_html/soshapal.com/maptst.php</b> on line <b>44</b><br />
    <br />
    <b>Warning</b>:  DOMDocument::saveXML() [<a href='domdocument.savexml'>domdocument.savexml</a>]: output conversion failed due to conv error, bytes 0xE9 0x61 0x6C 0x2C in <b>/home/vozemg0/public_html/soshapal.com/maptst.php</b> on line <b>64</b><br />
    

    这些消息使 XML 无效。

    【讨论】:

    • 我的某些地址中似乎有一些法语字母。当我更改它时,一切都已修复。非常感谢您的帮助
    猜你喜欢
    • 1970-01-01
    • 2010-11-24
    • 2013-01-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多