0 Replies Latest reply on Jul 26, 2007 2:39 PM by Gil1

    XMLListCollection Sorting Problem

    Gil1 Level 1
      I am sorting an XMLListCollection that has one element and several attributes. The element value is empty (all values associated with the element are in the attributes.

      I have the following code:

      carCompanies =
      <company age="3" blah="abc"/>
      <company age="2" blah="bc"/>
      <company age="2" blah="c"/>

      carCompaniesList = carCompanies.company;
      carCompaniesListCol = new XMLListCollection(carCompaniesList);

      sortA = new Sort();

      sortA.fields= [new SortField("@age", true), new SortField("@blah", true)];
      //sortA.fields= [new SortField(null, true)];


      Thus, if a trace carCompaniesListCol after the refresh I get 3 blank lines. I know the sort is working, because if I put values to the elements it works.

      My question is: how I display each company node in full after the sort? (ordered)