I have an application in Flex that retrieves XMLList (Tests) from a remote site which suppose to normally contain 5 children (Test) I use for each to loop through the XMLList and do some chartings which works fine. In some weird cases I received up to 10 children in my XMList and my application chose to use the last 5 whereas the correct set suppose to be the first 5 sets. How do i select just the first 5 sets and ignoring the last sets?
<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>
I have been able to solve this. I used the unix-time to choose between start time and endtime.