4 Replies Latest reply on Nov 19, 2009 9:02 PM by mike_morales

    Retreiving XML attributes from an arraycollection?

    mike_morales Level 2

      Hello, need a little help from the experts.  I used an HTTPService instance to grab an xml file.  My top level root node has an attribute titled 'recordCount' which is the amount of records returned from my database query. It looks like this

       

      <users recordCount="1675">

           <endUser id="1">John Doe</endUser>

            . . .

      </users> 

       

      I am using the ResultEvent to retrive the xml data and placed it into an arraycollection. I am able to traverse the nodes without a problem, but how do i access the attributes of a node? I tried using the XMLList syntax which is something like users.@recordCount to access an attribute value, but when trying to use this on the arraycollection, it failed.  I also tried converting the arraycollection into an XML instance, but still didnt work.  I am fairly new to flex, I am crossing over from flash development - and it is my understanding that it is preferred to use an arraycollections as opposed to XML objects because of the data binding features of the arraycollection correct?  Any help will be greatly appreciated, Thanks!!