I have a xml in the below format and need to get the id and name of all the SubEntity when I pass the ParentEntityId. This needs to be done in silverlight.
<Treeview>
<ParentEntity ParentEntityId="1" ParentEntityName="P1">
<Facility FacilityId="F1" FacilityName="F1">
<Category CategoryId="C1" CategoryName="C1"/>
<Category CategoryId="C2" CategoryName="C2" >
<Activity ActivityId="A1" ActivityName="A1" />
</Category>
</Facility>
<Facility FacilityId="F2" FacilityName="F2">
<Category CategoryId="C1" CategoryName="C1">
<Activity ActivityId="A2" ActivityName="A2" />
<Activity ActivityId="A3" ActivityName="A3" />
</Category>
</Facility>
<SubEntity SubEntityId="S1" SubEntityName="S1">
<SubEntity SubEntityId="S2" SubEntityName="S2"/>
</SubEntity>
<SubEntity SubEntityId="S3" SubEntityName="S3">
<SubEntity SubEntityId="S4" SubEntityName="S4">
<Facility FacilityId="F3" FacilityName="F3">
<Category CategoryId="C1" CategoryName="C1 >
<Activity ActivityId="A1" ActivityName="A1" />
</Category>
</Facility>
</SubEntity>
<SubEntity SubEntityId="S5" SubEntityName="S5">
<Facility FacilityId="F5" FacilityName="F5">
<Category CategoryId="C1" CategoryName="C1" />
<Category CategoryId="C2" CategoryName="C2"/>
</Facility>
</SubEntity>
<SubEntity SubEntityId="S6" SubEntityName="S6" />
</SubEntity>
</ParentEntity>
<ParentEntity ParentEntityId="2" ParentEntityName="P2">
<Facility FacilityId="F1" FacilityName="F1">
<Category CategoryId="C1" CategoryName="C1"/>
</Facility>
<SubEntity SubEntityId="S7" SubEntityName="S7" />
</ParentEntity>
</Treeview>
Assuming I pass my parentEntityId = 1, I need the output S1,S2,S3,S4,S5,S6.
Thanks in advance, Sunitha