Following is my xml file . I have to get Fields mentioned for each page and for each Type in comma separated string. Please help in how to proceed using Linq
Example : If I want "Type = customFields" defined for "page1" , have to get output in comma separated
ProjectID,EmployeeID,EmployeeName,hasExpiration etc
<Pages>
<Page Name="Page1" >
<Type TypeID="customfields">
<Field>ProjectID</Field>
<Field>EmployeeID</Field>
<Field>EmployeeName</Field>
<Field>HasExpiration</Field>
<Field>EndDate</Field>
</Type>
<Type TypeID="Directfields">
<Field>ProjectID</Field>
<Field>EmployeeID</Field>
<Field>EmployeeName</Field>
<Field>HasExpiration</Field>
<Field>EndDate</Field>
<Field>IsInUpdateMode</Field>
<Field>TimesheetSpendLimit</Field>
</Type>
</Page>
<Page Name="Page2" >
<Type TypeID="customfields">
<Field>ProjectID</Field>
<Field>EmployeeID</Field>
<Field>EmployeeName</Field>
<Field>HasExpiration</Field>
<Field>EndDate</Field>
<Field>IsInUpdateMode</Field>
<Field>TimesheetSpendLimit</Field>
</Type>
<Type TypeID="Directfields">
<Field>ProjectID</Field>
<Field>EmployeeID</Field>
<Field>EmployeeName</Field>
<Field>HasExpiration</Field>
<Field>EndDate</Field>
<Field>IsInUpdateMode</Field>
<Field>TimesheetSpendLimit</Field>
</Type>
</Page>
</Pages>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…