介绍两个好玩的jQuery插件:URL Parser 和 XML to JSON

jQuery URL Parser

 

看名称应该可以知道这个一个解析url的插件,方便你获取url的协议、主机名、路径、查询参数等:

image

 

jQuery XML to JSON Plugin

这东西是否多此一举呢?jQuery解析xml也不难的。不过我觉得对于解析比较大的XML文件,例如RSS,转为JSON还是比较方便的,例如作者说的:

------------------------------------------------------------------------
However
, jQuery's DOM traversing can soon become a little tiring if...
A. you

frequenly process XML responses from Ajax calls
B. you parse complex/large XML documents (such as RSS feeds)
...in which case this plugin is perfect for you.
------------------------------------------------------------------------

看下示例:

image

posted on 2010-03-25 10:23  Q.Lee.lulu  阅读(4595)  评论(1编辑  收藏  举报