如何用js对xml 时间排序?

新手上路,请多包涵
<item>
  <title>
    <![CDATA[云南网携]]>
  </title>
  <source>云南网</source>
  <author>3</author>
  <pubDate>25-08-2016 10:49:01 GMT</pubDate>
  <link>
    <a href=""/>
  </link>
</item>
<item>
  <title>
    <![CDATA[桂园向马碧]]>
  </title>
  <source>云南网</source>
  <author>1</author>
  <pubDate>22-08-2016 11:49:01 GMT</pubDate>
  <link>
    <a href=""/>
  </link>
</item>
<item>
  <title>
    <![CDATA[希望小学献爱心]]>
  </title>
  <source>云南网</source>
  <author>2</author>
  <pubDate>26-08-2016 10:49:01 GMT</pubDate>
  <link>
    <a href=""/>
  </link>
</item>

如何对上述xml文件用js对<pubDate>里的时间对<item>按最新时间进行排序?谢谢!

阅读 3k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题