This content has been marked as final. Show 2 replies
"whertzing" <email@example.com> wrote in message
>I get an XMLList from a Web Service by parsing the results of a web service
> call using event.result..Period, which gives an XMLList where each node
> has an
> attribute "PeriodStart" whose value is a datetime string.
> I want to use a slider (which returns integers for the slider start and
> location(s) within the max and min integers) to select just a "slice" of
> nodes. If my data werre an Array, I could use the array.slice(x,z) method
> get the elements with index values between the the start and end integers.
> Is there a (simple) way to get the nodes of an XMLList between two
> That is, if there were 10 nodes in the XMLList, and an implicit ordering
> to the
> nodes based on the value of the attribute @PeriodStart, and I wanted to
> get the
> 3rd through 7th node (a "slice" consiting of 5 nodes), how can I express
> in ActionSCript?
Use an XMLListCollection with a filterFunction.
Thank you for that pointer. The filterFunction was a bit tricky, I had to "store away" the value of the key attribute for the 3rd node and the 7th node in the slider, then filter the XMLList on "all values of the key attribute between the 3rd and 7th node, inclusive).