Groups
Groups
Sign in
Groups
Groups
谷歌地图 API 论坛
Conversations
About
Send feedback
Help
Gxml.parse(data) xml文件中文问题?
5 views
Skip to first unread message
map
unread,
Apr 29, 2008, 11:09:08 PM
4/29/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google 地图 API 讨论组
GDownloadUrl("data.xml",function(data){
var xml = GXml.parse(data);
我加载data.xml文件用GXml解析它
因为我的xml文件里的数据有中文所以GXml解析不了出错
数据都改成字符就没事,请问大家怎么解决数据是中文的问题
谢谢!
Hector Zhao
unread,
Apr 30, 2008, 1:37:03 AM
4/30/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google 地图 API 讨论组
data.xml文件和网页,js都用utf-8编码试试?
map
unread,
Apr 30, 2008, 1:58:54 AM
4/30/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google 地图 API 讨论组
我试了,不行,有中文就不行,没有中文就可以
我先在GDownload("a.asp",function(data){
//先在a.asp中文形成a.xml文件
GDownload("a.xml" ,function(data){
GXml(data)//在解析xml文件
})
})
有中文就不行
<?xml version="1.0" encoding="GBK"?>
<markers>
<marker L_id="0001" L_name="ghj" L_tel="42142" L_address="ghjghj"
L_path="ghjghj, 212" L_city="沈阳" L_lat="42.147114459221"
L_lng="124.244384765625"/>
</markers>
Hector Zhao
unread,
Apr 30, 2008, 2:03:35 AM
4/30/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google 地图 API 讨论组
如果你有这一行......<?xml version="1.0" encoding="GBK"?>
那就都用gb2312试一试......
Reply all
Reply to author
Forward
0 new messages