8
Answers

Selectd child nodes only show in data grid from XML document ....

Ankit Rathore

Ankit Rathore

14y
3.9k
1
Hi Guys,
I am very New in C# so please don't mind if I ask the silly question.........please cooperate me .
 
My problem is that suppose I am having very big XML file with lots of child nodes inside, and from them I have to select 2 or 3  child from the list,
What would be the approach to get data in datagrid.
 
Suppose I am having XML document is like:- in which I have to show only 3 child nodes like BoxName , BoxDesc, Location and Status only then how can we Show these  in datagrid.
Please Help me ...........

<FileManager>
    <BoxDetails>
        <BoxName>101</BoxName>
        <BoxDesc>Student Records</BoxDesc>
        <Location>5th Floor, Self 1</Location>
        <StorageDate>10/12/2008</StorageDate>
        <StorageUntil>10/12/2009</StorageUntil>
        <Status>Destroyed</Status>
        <AvailableFolder>Bangalore- 2009 Marksheets</AvailableFolder>    
    </BoxDetails>
    <BoxDetails>
        <BoxName>201</BoxName>
        <BoxDesc>College Records</BoxDesc>
        <Location>6th Floor, Self 1</Location>
        <StorageDate>10/12/2007</StorageDate>
        <StorageUntil>10/12/2009</StorageUntil>
        <Status>Checked</Status>
        <AvailableFolder>BHOPAL- 2009 Marksheets</AvailableFolder>
    </BoxDetails>
    <BoxDetails>
        <BoxName>301</BoxName>
        <BoxDesc>PO Records</BoxDesc>
        <Location>5th Floor, Self 1</Location>
        <StorageDate>10/12/2006</StorageDate>
        <StorageUntil>10/12/2007</StorageUntil>
        <Status>Checked</Status>
        <AvailableFolder>Bangalore- 2009 SOAP</AvailableFolder>
    </BoxDetails>

    <BoxDetails>
        <BoxName>401</BoxName>
        <BoxDesc>PR Records</BoxDesc>
        <Location>5th Floor, Self 1</Location>
        <StorageDate>10/04/2008</StorageDate>
        <StorageUntil>10/08/2008</StorageUntil>
        <Status>Destroyed</Status>
        <AvailableFolder>Bangalore- 2009 Soap</AvailableFolder>
    </BoxDetails>

   
</FileManager>

 

Answers (8)