我在Flex中有一个应用程序从远程站点检索XMLList(测试),该站点通常包含5个子项(Test),我用它们来遍历XMLList并做一些工作正常的图表。在一些奇怪的情况下,我在我的XMList中收到了多达10个孩子,我的应用程序选择使用最后5个,而正确的集合假设是前5个。我如何只选择前5组而忽略最后的组?
<Tests count="10">
<Test unix_time="1378375047" client="25478955" id="831527">
<means>502</means>
<variance>56.3</variance>
<frequency>50</frequency>
</Test>
<Test unix_time="1378375047" client="25478955" id="831529">
<means>502</means>
<variance>56.3</variance>
<frequency>50</frequency>
</Test>
<Test unix_time="1378375047" client="25478955" id="831526">
<means>502</means>
<variance>56.3</variance>
<frequency>50</frequency>
</Test>
<Test unix_time="1378375047" client="25478955" id="831528">
<means>502</means>
<variance>56.3</variance>
<frequency>50</frequency>
</Test>
<Test unix_time="1378375047" client="25478955" id="831530">
<means>502</means>
<variance>56.3</variance>
<frequency>50</frequency>
</Test>
<Test unix_time="1378375200" client="25478955" id="831652">
<means>600</means>
<variance>44</variance>
<frequency>45</frequency>
</Test>
<Test unix_time="1378375200" client="25478955" id="831654">
<means>600</means>
<variance>44</variance>
<frequency>45</frequency>
</Test>
<Test unix_time="1378375200" client="25478955" id="831651">
<means>600</means>
<variance>44</variance>
<frequency>45</frequency>
</Test>
<Test unix_time="1378375200" client="25478955" id="831653">
<means>600</means>
<variance>44</variance>
<frequency>45</frequency>
</Test>
<Test unix_time="1378375200" client="25478955" id="831655">
<means>600</means>
<variance>44</variance>
<frequency>45</frequency>
</Test>
</Tests>
答案 0 :(得分:0)
我能够解决这个问题。我使用unix-time在开始时间和结束时间之间进行选择。