如何使用find或filter来读取指定过滤条件的xml元素
风影极光 2012-08-10 08:57:58 xml数据结构如下:
<?xml version="1.0" encoding="utf-8" ?>
<bookstore>
<book>
<title>Rain</title>
<year>2010</year>
<author>Martin</author>
</book>
<book>
<title>Cloud</title>
<year>2009</year>
<author>Robert</author>
</book>
<book>
<title>River</title>
<year>2007</year>
<author>Fred</author>
</book>
</bookstore>
[/code]
如何获取title等于Cloud的元素,我想使用find活filter直接来取。越简单越好,不要使用each来遍历。