parsererror while AJAXing XML with jQuery

I'm getting a parsererror when using this ajax request in Internet Explorer (7 and 8). I'm using jquery 1.4.1 $.ajax({ url: 'data.xml', dataType: 'xml', contentType: 'text/xml', // also tried application/xml success: doFunction }); I read somewhere else that I should set the content type, but I don't know where. The contentType param set in the above code example doesn't do anything (I could leave it out, no change). Can I set a Content Type as tag? I tried, but then the XML won't validate. Any thoughts on this?
Well what does your XML response look like? What makes you think that it does not contain a syntax error of some sort? What MIME type does your server return in the HTTP response header?

以上就是parsererror while AJAXing XML with jQuery的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏