<Root>
<Family ID="1">
<Member Name="Abe" DOB="3/31/42" />
<Member Name="Betty" DOB="2/4/49" />
<Member Name="Cathy" DOB="12/2/78" />
<Member Name="Dan" Father="Abe" Mother="Betty" DOB="6/12/73" />
</Family>
<Family ID="2">
<Member Name="Edith" Father="Abe" Mother="Betty" DOB="8/30/80" />
<Member Name="Frank" DOB="11/4/70" />
<Member Name="George" Father="Dan" Mother="Cathy" DOB="5/13/94" />
<Member Name="Harold" Father="Dan" Mother="Cathy" DOB="7/1/97" />
<Member Name="Irwin" Father="Frank" Mother="Edith" DOB="10/31/01" />
<Member Name="Janet" Father="Frank" Mother="Edith" DOB="1/17/03" />
</Family>
</Root>
This is my Xml file.I want to seperate every family tag by using it's ID attribute and also i want to read the attributes from Member elements.i write a code for this But i am getting error.I am using framework 2.0 and c#.In vb.net there is a property named ItemOf,but in c# it's not existing.So any body help me.Thanks in advance
<Family ID="1">
<Member Name="Abe" DOB="3/31/42" />
<Member Name="Betty" DOB="2/4/49" />
<Member Name="Cathy" DOB="12/2/78" />
<Member Name="Dan" Father="Abe" Mother="Betty" DOB="6/12/73" />
</Family>
<Family ID="2">
<Member Name="Edith" Father="Abe" Mother="Betty" DOB="8/30/80" />
<Member Name="Frank" DOB="11/4/70" />
<Member Name="George" Father="Dan" Mother="Cathy" DOB="5/13/94" />
<Member Name="Harold" Father="Dan" Mother="Cathy" DOB="7/1/97" />
<Member Name="Irwin" Father="Frank" Mother="Edith" DOB="10/31/01" />
<Member Name="Janet" Father="Frank" Mother="Edith" DOB="1/17/03" />
</Family>
</Root>
This is my Xml file.I want to seperate every family tag by using it's ID attribute and also i want to read the attributes from Member elements.i write a code for this But i am getting error.I am using framework 2.0 and c#.In vb.net there is a property named ItemOf,but in c# it's not existing.So any body help me.Thanks in advance
Comment