Skip navigation
Rohini_1327
Currently Being Moderated

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

Apr 9, 2013 10:54 PM

Tags: #data #as3 #flex #xml #tree #actionscript #actionscript_3.0 #flex2 #xmllist #flex3

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

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points