3 Replies Latest reply on Jul 13, 2010 9:51 PM by BhaskerChari

    Export ArrayCollection into XML file

    djh88ukwb Level 1

      Hello all,

       

      Is it at all possible to export an ArrayCollection from Flex, into a XML file.

       

      My array collection is being viewed in a datagrid as follows

              <mx:DataGrid x="360" y="120" width="448" height="200" dataProvider="{questionsArr}">
                  <mx:columns>
                      <mx:DataGridColumn headerText="Question" dataField="question"/>
                      <mx:DataGridColumn headerText="Start" dataField="start" width="40" textAlign="center"/>
                      <mx:DataGridColumn headerText="Stop" dataField="stop" width="40" textAlign="center"/>
                  </mx:columns>
              </mx:DataGrid>

       

      And i want the output of the XML to look like this

      <Cue>
      <section question="" start="" stop=""/>
      <section question="" start="" stop=""/>
      <section question="" start="" stop=""/>
      </Cue>

       

      Is it at all possible ?  I mean all the data is there ready, it just needs to be saved . .