6 Replies Latest reply on Dec 22, 2009 5:49 PM by saisri2k2

    Please help me to parse any xml data response

    michaelflex1980

      Hi All,

       

      I am looking for a code to parse the xml response which i receive from HTTPService. I cant predict the elements or attributes, it will be dynamic.

      I have seen a lot of examples to parse the xml if I know the xml elements.

       

      I need to parse the xml, create collection of objects and put into ArrayCollection.

       

      Based on this array collection, i will display the data in a datagrid of a VBox of an Accordion.

       

           <cash>

       

              <bank>

       

                  <name>Chase</name>

       

                  <type>Checking</type>

       

                  <currency_symbol>$</currency_symbol>

       

                  <balance>7000</balance>

       

                  <active>true</active>

       

              </bank>

           </cash>

       

           <credits> 

       

              <bank>

       

                  <name>WF Investment</name>

       

                  <currency_symbol>$</currency_symbol>

       

                  <balance>130000.00</balance>

       

                  <active>true</active>

       

              </bank>

            </credits> 

       

           The xml may looks like this. if <cash> tag there, then accordion will contain VBox of accordion having label "Cash" and same for "Credits".

      The datagrid inside the each VBox will contain the bank details.

       

      Please give me some good suggestions to acheive this task.

       

       

      i use flex builder 3 and sdk 3.2.

       

      Thanks,

      Michael