title: Initializing a collection from MXML
body: <p>Gentlepersons,</p>
  
  <p>How does one initialize a collection instance from MXML in Flex/Actionscript?</p>
  
  <p><strong>Background</strong></p>
  
  <p>Let's assume that:</p>
  
  <ul>
  <li>I've got three lists of number-name
  pairs.</li>
  <li>The contents of each list never
  changes, but I may want to add new
  lists in future.</li>
  <li>The user can choose which list to
  use.</li>
  </ul>
  
  <p>I know how
     to use MXML to define/initialize a
     Flex UI component, but that is the
     full extent of my XML experience.</p>
  
  <p><strong>Problem</strong></p>
  
  <p>How do I write a combination of XML declarations and Actionscript classes such that I can initialize each of my three lists from XML?</p>
  
  <p>Please note that I am <strong>not</strong> trying to populate a Flex UI element (such as a DataGrid) with the various number-name pairs. I'm just trying to read the data into a plain old vanilla collection.  (Once I've got my collections initialized, I can populate DataGrids or whatever at my leisure.) I can't find any documentation of how to address this super-simple case. The documentation all assumes that I'm trying to do something much more complicated, such as accessing a remote database, which confuses the issue tremendously.</p>
  
  <p>Thanks!  :-)</p>
  
  <p>Jim Plamondon, Texas</p>