关于采集时间从倒序开始
想采集下面代码中的<context>与</context> 之间的城市名称,但要从<time>与</time>之间的最新时间采集起,即从下面采集上来,最新时间放在前面
<?xml version="1.0" encoding="UTF-8" ?>
- <TrackResult>
<message>上海</message>
<nu>123456</nu>
- <data>
- <itme>
<time>2013-06-28</time>
<context>北京</context>
</itme>
- <itme>
<time>2013-06-29</time>
<context>广州</context>
</itme>
- <itme>
<time>2013-06-30</time>
<context>深圳</context>
</itme>
- <itme>
<time>2013-07-10</time>
<context>杭州</context>
</itme>
- <itme>
<time>2013-07-20</time>
<context>南京</context>
</itme>
</data>
<state>1</state>
<condition>7</condition>
</TrackResult>
------解决方案--------------------在输出循环的时候,比如:
for i=0 to count-1改为:
for i=count-1 to 0 step -1