jQuery xml2json插件在IE中不起作用 [英] jQuery xml2json pluggin does not work in IE

查看:97
本文介绍了jQuery xml2json插件在IE中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在使用jQuery xml2json插件( http:// www .fyneworks.com / jquery / xml-to-json / )将xml解析为json,但在IE中无法正常工作。我想知道是否有人可以帮我处理这个问题。


i'm using a jQuery xml2json pluggin (http://www.fyneworks.com/jquery/xml-to-json/) to parse xml to json but it doesn't work fine in IE. I wonder if someone could help me handling this.

这是一个我要转换为json的xml示例:<?xml version =' 1.0'coding ='iso-8859-1'standalone ='no'?> <上下文> < object objid =228author =johnDoecreation-date =2012-10-24 22:55:09.0last-updated =2012-10-24 22:55:09.0type =objectType name =ojectTestavailability =publicstatus =active> <属性集> < attribute attid =399name =Geo-Locationvalue =12.1234567_-32.1234567time =2012-10-24 22:56:10.0/> < /属性集> <关系-集> < /关系-集> < / object>< / context>

提前致谢。

Here's a xml sample that I want to convert to json: <?xml version='1.0' encoding='iso-8859-1' standalone='no'?> <context> <object objid="228" author="johnDoe" creation-date="2012-10-24 22:55:09.0" last-updated="2012-10-24 22:55:09.0" type="objectType" name="ojectTest" availability="public" status="active"> <attribute-set> <attribute attid="399" name="Geo-Location" value=" 12.1234567_-32.1234567" time="2012-10-24 22:56:10.0"/> </attribute-set> <relation-set> </relation-set> </object></context>

Thanks in advance.

推荐答案

也许IE的单引号有问题。尽量只使用双引号

Maybe IE has problems with your single quotes. Try to use only double quotes

<?xml version="1.0" encoding="iso-8859-1" ...

这篇关于jQuery xml2json插件在IE中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆