2 Replies Latest reply on Sep 27, 2009 8:32 PM by Joey-ATL

    Simple question about reading XML

    Joey-ATL

      I am going through an example that has XML at two levels like this:

       

      contents of my test.xml file:

      <data>

           <order>

                <name>John</name>

           </order>

      </data>

       

      And in my application mxml file I have this:

       

          <mx:Model id="testModel" source="model/test.xml"/>

       

          <mx:ArrayCollection id="acOrders" source="{testModel.order}"/>

          
          <mx:DataGrid id="orderGrid" width="100%" height="100%" dataProvider="{acOrders}">
              <mx:columns>
                  <mx:DataGridColumn dataField="name" headerText="Name"/>
              </mx:columns>
          </mx:DataGrid>

       

       

      The above code works fine, but I want to change the XML to a strucute like so:

      <data>

           <order>

                 <shipping>

                     <name>John</name>

                </shipping>

           </order>

      </data>

       

      And I have tried to make changes to accomodate the new <shipping> tag but nothing yields data.  What is the secret for accessing deeper levels of XML?