用于 JavaScript 的 XML 解析器 [英] XML parser for JavaScript

查看:29
本文介绍了用于 JavaScript 的 XML 解析器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个很好的 JavaScript 库来解析 XML 数据.它应该比内置的 XML DOM 解析器浏览器.

I am looking for a good JavaScript library for parsing XML data. It should be much easier to use than the built-in XML DOM parsers bundled with the browsers.

我在使用 JSON 时有点被宠坏了,我期待着与 XML 类似的东西.

I got spoiled a bit working with JSON and am looking forward to something on similar lines for XML.

推荐答案

为此我使用 jQuery.这是一个很好的例子:

I use jQuery for this. Here is a good example:

(注意 - 以下博客似乎已消失.)

( Note - the following blog seems to have gone away.)

http://blog.reindel.com/2007/09/24/jquery-and-xml-revisited/

jQuery 文档中也有很多很好的例子:

There are also lots and lots of good examples in the jQuery documentation:

http://www.webmonkey.com/tutorial/Easy_XML_Consumption_using_jQuery?oldid=20032

由于我的主要示例的博客消失了,我想添加另一个示例来展示基础知识并帮助解决命名空间问题:

Due to the blog for my primary example going away, I wanted to add another example that shows the basics and helps with namespace issues:

http://www.zachleat.com/web/selecting-xml-with-javascript/

这篇关于用于 JavaScript 的 XML 解析器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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