EDN Admin
Well-known member
<div id="x_pageRight
<span><span> HI,
<span><span><br/>
I have an XML which is is like below <br/>
<br/>
<div id="x_pageMain
<table>
<tbody>
<tr>
<td>
<pre>1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
[/code]
</td>
<td>
<pre id="x_codeSnippet10-27027677-1 <Root xmlns="Acc.StarPlus.XsdLibrary
<PublicCountStatistic>
<StatisticCode xmlns="Acc.StarPlus.XsdLibrary
<CategoryId>70</CategoryId>
<CategoryValueId>2101</CategoryValueId>
<DisplayCode>1</DisplayCode>
<DisplayName>FOREIGN REVOKED CORPS </DisplayName>
<EnumName>FOREIGNREVOKEDCORPS</EnumName>
<IsActive>1</IsActive>
<SortOrder>1</SortOrder>
</StatisticCode>
<StatisticCount>10480</StatisticCount>
<StatisticDate>2009-12-31T00:00:00</StatisticDate>
<StatisticType>CT</StatisticType>
</PublicCountStatistic>
<PublicCountStatistic>
<StatisticCode xmlns="Acc.StarPlus.XsdLibrary
<CategoryId>70</CategoryId>
<CategoryValueId>2102</CategoryValueId>
<DisplayCode>2</DisplayCode>
<DisplayName>DOMESTIC REVOKED CORPORATIONSDisplayName>
<EnumName>DOMESTICREVOKEDCORPORATIONS<EnumName>
<IsActive>1</IsActive>
<SortOrder>1</SortOrder>
</StatisticCode>
<StatisticCount>6</StatisticCount>
<StatisticDate>2009-12-31T00:00:00</StatisticDate>
<StatisticType>CT</StatisticType>
</PublicCountStatistic>
<PublicCountStatistic>
<StatisticCode xmlns="Acc.StarPlus.XsdLibrary
<CategoryId>70</CategoryId>
<CategoryValueId>2104</CategoryValueId>
<DisplayCode>4</DisplayCode>
<DisplayName>FOREIGN DELINQUENT CORPS<DisplayName>
<EnumName>FOREIGNDELINQUENTCORPS</EnumName>
<IsActive>1</IsActive>
<SortOrder>1</SortOrder>
</StatisticCode>
<StatisticCount>934</StatisticCount>
<StatisticDate>2009-12-31T00:00:00</StatisticDate>
<StatisticType>CT</StatisticType>
</PublicCountStatistic>
<PublicCountStatistic>
<StatisticCode xmlns="Acc.StarPlus.XsdLibrary
<CategoryId>70</CategoryId>
<CategoryValueId>2105</CategoryValueId>
<DisplayCode>5</DisplayCode>
<DisplayName>DOMESTIC DELINQUENT CORPS </DisplayName>
<EnumName>DOMESTICDELINQUENTCORPS</EnumName>
<IsActive>1</IsActive>
<SortOrder>1</SortOrder>
</StatisticCode>
<StatisticCount>4540</StatisticCount>
<StatisticDate>2009-12-31T00:00:00</StatisticDate>
<StatisticType>CT</StatisticType>
</PublicCountStatistic>
<PublicCountStatistic>
<StatisticCode xmlns="Acc.StarPlus.XsdLibrary
<CategoryId>70</CategoryId>
<CategoryValueId>2106</CategoryValueId>
<DisplayCode>6</DisplayCode>
<DisplayName>FOREIGN CORPORATIONS</DisplayName>
<EnumName>FOREIGNCORPORATIONS</EnumName>
<IsActive>1</IsActive>
<SortOrder>1</SortOrder>
</StatisticCode>
<StatisticCount>58897</StatisticCount>
<StatisticDate>2009-12-31T00:00:00</StatisticDate>
<StatisticType>CT</StatisticType>
</PublicCountStatistic>
<PublicCountStatistic>
<StatisticCode xmlns="Acc.StarPlus.XsdLibrary
<CategoryId>70</CategoryId>
<CategoryValueId>2107</CategoryValueId>
<DisplayCode>7</DisplayCode>
<DisplayName>DOMESTIC CORPORATIONS</DisplayName>
<EnumName>DOMESTICCORPORATIONS</EnumName>
<IsActive>1</IsActive>
<SortOrder>1</SortOrder>
</StatisticCode>
<StatisticCount>550861</StatisticCount>
<StatisticDate>2009-12-31T00:00:00</StatisticDate>
<StatisticType>CT</StatisticType>
</PublicCountStatistic>
<PublicCountStatistic>
<StatisticCode xmlns="Acc.StarPlus.XsdLibrary
<CategoryId>70</CategoryId>
<CategoryValueId>2108</CategoryValueId>
<DisplayCode>8</DisplayCode>
<DisplayName>FOREIGN CORPORATIONS ADDED</DisplayName>
<EnumName>FOREIGNCORPORATIONSADDED</EnumName>
<IsActive>1</IsActive>
<SortOrder>1</SortOrder>
</StatisticCode>
<StatisticCount>202</StatisticCount>
<StatisticDate>2009-12-31T00:00:00</StatisticDate>
<StatisticType>MTH</StatisticType>
</PublicCountStatistic>
<PublicCountStatistic>
<StatisticCode xmlns="Acc.StarPlus.XsdLibrary
<CategoryId>70</CategoryId>
<CategoryValueId>2110</CategoryValueId>
<DisplayCode>10</DisplayCode>
<DisplayName>DOMESTIC CORPORATIONS REINSTATED</DisplayName>
<EnumName>DOMESTICCORPORATIONSREINSTATED</EnumName>
<IsActive>1</IsActive>
<SortOrder>1</SortOrder>
</StatisticCode>
<StatisticCount>225</StatisticCount>
<StatisticDate>2009-12-31T00:00:00</StatisticDate>
<StatisticType>MTH</StatisticType>
</PublicCountStatistic>[/code]
</td>
</tr>
</tbody>
</table>
basically what i need to do here is : I need to write a LINQ query
<br/>
To bind the above XML data to the datagrids in silverlight<br/>
For Statistic type CT , i need to bind the grid like below<br/>
<br/>
<br/>
BusinessCorporations
Revoked Corps Delinquent Corps <br/>
<br/>
Foreign 58897((i,e) ForeignCorporation 10480 934<br/>
Statistic code)
<br/>
<br/>
<br/>
<br/>
Domestic 550861 6
4540<br/>
<br/>
<br/>
Please i am new to LINQ, please help me to write a LINQ query to bind the above XML data to the datagrid like above
Thanks for your replies,<br/>
<br/>
I am taking the XML data into a collection
The Row headers Foreign and Domestic are not there in the XML data
Ex: If from the XML StatisticCode.EnumName="ForeignBusinessCorporations" then it should display beside the
Row header Foreign and if it is DomesticBusinessCorporation, it should display beside the rowheader Domestic
Thanks,
View the full article
<span><span> HI,
<span><span><br/>
I have an XML which is is like below <br/>
<br/>
<div id="x_pageMain
<table>
<tbody>
<tr>
<td>
<pre>1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
[/code]
</td>
<td>
<pre id="x_codeSnippet10-27027677-1 <Root xmlns="Acc.StarPlus.XsdLibrary
<PublicCountStatistic>
<StatisticCode xmlns="Acc.StarPlus.XsdLibrary
<CategoryId>70</CategoryId>
<CategoryValueId>2101</CategoryValueId>
<DisplayCode>1</DisplayCode>
<DisplayName>FOREIGN REVOKED CORPS </DisplayName>
<EnumName>FOREIGNREVOKEDCORPS</EnumName>
<IsActive>1</IsActive>
<SortOrder>1</SortOrder>
</StatisticCode>
<StatisticCount>10480</StatisticCount>
<StatisticDate>2009-12-31T00:00:00</StatisticDate>
<StatisticType>CT</StatisticType>
</PublicCountStatistic>
<PublicCountStatistic>
<StatisticCode xmlns="Acc.StarPlus.XsdLibrary
<CategoryId>70</CategoryId>
<CategoryValueId>2102</CategoryValueId>
<DisplayCode>2</DisplayCode>
<DisplayName>DOMESTIC REVOKED CORPORATIONSDisplayName>
<EnumName>DOMESTICREVOKEDCORPORATIONS<EnumName>
<IsActive>1</IsActive>
<SortOrder>1</SortOrder>
</StatisticCode>
<StatisticCount>6</StatisticCount>
<StatisticDate>2009-12-31T00:00:00</StatisticDate>
<StatisticType>CT</StatisticType>
</PublicCountStatistic>
<PublicCountStatistic>
<StatisticCode xmlns="Acc.StarPlus.XsdLibrary
<CategoryId>70</CategoryId>
<CategoryValueId>2104</CategoryValueId>
<DisplayCode>4</DisplayCode>
<DisplayName>FOREIGN DELINQUENT CORPS<DisplayName>
<EnumName>FOREIGNDELINQUENTCORPS</EnumName>
<IsActive>1</IsActive>
<SortOrder>1</SortOrder>
</StatisticCode>
<StatisticCount>934</StatisticCount>
<StatisticDate>2009-12-31T00:00:00</StatisticDate>
<StatisticType>CT</StatisticType>
</PublicCountStatistic>
<PublicCountStatistic>
<StatisticCode xmlns="Acc.StarPlus.XsdLibrary
<CategoryId>70</CategoryId>
<CategoryValueId>2105</CategoryValueId>
<DisplayCode>5</DisplayCode>
<DisplayName>DOMESTIC DELINQUENT CORPS </DisplayName>
<EnumName>DOMESTICDELINQUENTCORPS</EnumName>
<IsActive>1</IsActive>
<SortOrder>1</SortOrder>
</StatisticCode>
<StatisticCount>4540</StatisticCount>
<StatisticDate>2009-12-31T00:00:00</StatisticDate>
<StatisticType>CT</StatisticType>
</PublicCountStatistic>
<PublicCountStatistic>
<StatisticCode xmlns="Acc.StarPlus.XsdLibrary
<CategoryId>70</CategoryId>
<CategoryValueId>2106</CategoryValueId>
<DisplayCode>6</DisplayCode>
<DisplayName>FOREIGN CORPORATIONS</DisplayName>
<EnumName>FOREIGNCORPORATIONS</EnumName>
<IsActive>1</IsActive>
<SortOrder>1</SortOrder>
</StatisticCode>
<StatisticCount>58897</StatisticCount>
<StatisticDate>2009-12-31T00:00:00</StatisticDate>
<StatisticType>CT</StatisticType>
</PublicCountStatistic>
<PublicCountStatistic>
<StatisticCode xmlns="Acc.StarPlus.XsdLibrary
<CategoryId>70</CategoryId>
<CategoryValueId>2107</CategoryValueId>
<DisplayCode>7</DisplayCode>
<DisplayName>DOMESTIC CORPORATIONS</DisplayName>
<EnumName>DOMESTICCORPORATIONS</EnumName>
<IsActive>1</IsActive>
<SortOrder>1</SortOrder>
</StatisticCode>
<StatisticCount>550861</StatisticCount>
<StatisticDate>2009-12-31T00:00:00</StatisticDate>
<StatisticType>CT</StatisticType>
</PublicCountStatistic>
<PublicCountStatistic>
<StatisticCode xmlns="Acc.StarPlus.XsdLibrary
<CategoryId>70</CategoryId>
<CategoryValueId>2108</CategoryValueId>
<DisplayCode>8</DisplayCode>
<DisplayName>FOREIGN CORPORATIONS ADDED</DisplayName>
<EnumName>FOREIGNCORPORATIONSADDED</EnumName>
<IsActive>1</IsActive>
<SortOrder>1</SortOrder>
</StatisticCode>
<StatisticCount>202</StatisticCount>
<StatisticDate>2009-12-31T00:00:00</StatisticDate>
<StatisticType>MTH</StatisticType>
</PublicCountStatistic>
<PublicCountStatistic>
<StatisticCode xmlns="Acc.StarPlus.XsdLibrary
<CategoryId>70</CategoryId>
<CategoryValueId>2110</CategoryValueId>
<DisplayCode>10</DisplayCode>
<DisplayName>DOMESTIC CORPORATIONS REINSTATED</DisplayName>
<EnumName>DOMESTICCORPORATIONSREINSTATED</EnumName>
<IsActive>1</IsActive>
<SortOrder>1</SortOrder>
</StatisticCode>
<StatisticCount>225</StatisticCount>
<StatisticDate>2009-12-31T00:00:00</StatisticDate>
<StatisticType>MTH</StatisticType>
</PublicCountStatistic>[/code]
</td>
</tr>
</tbody>
</table>
basically what i need to do here is : I need to write a LINQ query
<br/>
To bind the above XML data to the datagrids in silverlight<br/>
For Statistic type CT , i need to bind the grid like below<br/>
<br/>
<br/>
BusinessCorporations
Revoked Corps Delinquent Corps <br/>
<br/>
Foreign 58897((i,e) ForeignCorporation 10480 934<br/>
Statistic code)
<br/>
<br/>
<br/>
<br/>
Domestic 550861 6
4540<br/>
<br/>
<br/>
Please i am new to LINQ, please help me to write a LINQ query to bind the above XML data to the datagrid like above
Thanks for your replies,<br/>
<br/>
I am taking the XML data into a collection
The Row headers Foreign and Domestic are not there in the XML data
Ex: If from the XML StatisticCode.EnumName="ForeignBusinessCorporations" then it should display beside the
Row header Foreign and if it is DomesticBusinessCorporation, it should display beside the rowheader Domestic
Thanks,
View the full article