5 Replies Latest reply on Sep 1, 2010 2:54 PM by asaraf12345

    Datagrid: how to display nested or multi level xml tags

    asaraf12345

      Hi,

       

      I am currently looking to display as an example the following xml in a datagrid -

      <?xml version="1.0" encoding="utf-8"?>

      <?xml version="1.0" encoding="utf-8"?>

      <projects pagination="10" currentPage="1">

      <project sno="1" name="A">

           <followUp>yes</followUp>

           <lastModified>15/08/2010</lastModified>

           <description>Project Tracker - Track all personal and freelance projects here.</description>

          <tasks>

                <task id="1">XML - complete the xml</task>

                <task id="2"Flex - create the hello world example</task>

                <task id="3">XML - complete the xml</task>

                <task id="4"Flex - create the hello world example</task>

           </tasks>

           <totalAmount received="40000" total="140000">1,00,000</totalAmount>

      </project>

      <project sno="2" name="A">

           <currentStatus>Open1</currentStatus>

           <followUp>no</followUp>

           <lastModified>15/08/2010</lastModified>

           <description>Project Tracker - Track all personal and freelance projects here.</description>

          <tasks>

                <task id="1" status="pending">XML - complete the xml</task>

                <task id="2" status="pending">Flex - create the hello world example</task>

           </tasks>

           <totalAmount received="40000" total="140000">1,00,000</totalAmount>

      </project>

      </projects>

       

      The major problem I am facing is with displaying the task tags which are inside the tasks tag and can be said a second level of nesting after the first "project" tag inside projects, I can display other tags inside the datagridcolumn easily by using the dataField attribute but just clueless how to handle the tasks tag having same named task tags inside as its children.

       

      I searched a lot of content on the internet and in the books but just not finding anything relevant to the above case.

       

      Any help will be highly appreciable.

       

      Thanks in advance,

      Anmol Saraf