1 Reply Latest reply on Apr 10, 2013 10:51 PM by r4raghs

    Converting a 2Dimensional Array(Hierarchical Data) into XML List/Xml/Xmlistcollection in Flex

    Rohini_1327

      How to convert a flat/hierarchical data (which I get from Excel as 2D Array) to XML format in Flex. The following is my Hierarchical Data:(Table form)

       

      Asia
      IndiaChennaiTNCategory1Product1

      100

      Asia
      IndiaMumbaiMHCategory1Product1100
      Asia
      IndiaCalcuttaCTCategory1Product1100
      Asia
      IndiaCalcuttaCTCategory2Product2200
      EMEAUKLondonLNCategory3Product1122
      EMEAUKLondonLNCategory3Product2201
      EMEAUKReadingRNCategory1Product1123
      EMEAUKReadingRNCategory1Product2455

       

      I need to format/convert this to XML format so that I can populate that resulting xml as dataprovider to a Tree control.

      I need to populate the above data into Tree component such that I get the following output:

      Asia
               India
                     Chennai
                         TN
                             Category1
                                  Product1
                                           100
          Mumbai
                          MH
                             Category1
                                   Product1
                                            100  

      .............goes on till last numerical data of above table