首页 >社区问答列表 >javascript - 如何用js对xml 时间排序?

javascript - 如何用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>按最新时间进行排序?谢谢!

无数据提示还没有回复,楼主喊你快去抢前排~~~我来回答