1 Reply Latest reply on Dec 8, 2009 12:28 AM by iamfuric

    XML and datagrid binding

    ragavan4321

      Hi,

       

      Here is my xml

       

      <source>
           <Cons>560</Cons>
      </source>
      <altag>
           <txt string="1242803489">
                <frags>Your partner for global.</frags>
           </txt>
      </altag>

      <altag>
            <pnode>

                <txt string="1242678996">
                      <frags>Your partner for asia.</frags>
                 </txt>

           </pnode>
      </altag>

      <txt string="1242678996">
           <frags>Your partner for africa.</frags>
      </txt>

       

      My question is - With the above structure of XML I need to populate the data to a datagrid. I need only the string attribute from the txt node and frags node value. So my datagrid will only contain string number as first column and frags node text in the second column. My problem is txt node will be at any level in the xml document so how do I write my code to pick up all the txt & frags nodes irrespective of its level. lastresult.* doesn't seem to work? I'm using http service to get the xml as e4x.

       

      Any help would be appreciated and sorry if this question was answered previously on this forum.

       

      Thanks