2 Replies Latest reply on Jul 13, 2010 8:42 AM by rootsounds

    Retrive values from XML file only supports one type ?

    djh88ukwb Level 1

      Hello all,

       

      I am populating a datagrid using the following code

          <fx:Declarations>
              <s:HTTPService id="myXML" url="test.xml" resultFormat="e4x"     
                             result="myXML_resultHandler(event)"/>
          </fx:Declarations>

       

                  protected function myXML_resultHandler(event:ResultEvent):void           
                  {       
                      xmlMainList.source = event.result.children();           
                      dg.dataProvider=xmlMainList;                       
                  }

       

      Now my XML file looks like this

      <question>
      <section title="Play All" start="0" stop="241"/>
      <section title="Section One" start="20.847" stop="40"/>
      <section title="Section Two" start="60" stop="75"/>
      <section title="Section Three" start="80" stop="100"/>
      <section title="Section Four" start="120" stop="160"/>
      <section title="Section Five " start="170" stop="200"/>
      </question>

       

      This loads in fine, and populates the datagrid, however the xml files I am going to use have the following layout

      <question>
      <section>
      <title>Section One</title>
      <start>20.847</start>
      <stop>40</stop>
      </section>
      </question>

      When i use this in my XML file, i get nothing in my datagrid.

       

      Any ideas ?