In the xml document below, I would like to retrieve the distinct
attributes for the element '<Bal>'. However, I haven't had any
success. Here is what I have so far:
<TRANS>
<TRAN TRAN_DESC_CD="A CRT" TRAN_DESC="Actu al Rate">
<BAL BAL_FLD_NUM="3" BAL_FLD_DSCR="A ctual Rate Amount">
<SUBDEAL SUB_Deal_ID="00 11-01" />
</BAL>
<BAL BAL_FLD_NUM="3" BAL_FLD_DSCR="A ctual Rate Amount">
<SUBDEAL SUB_Deal_ID="00 13-01" />
</BAL>
<BAL BAL_FLD_NUM="2" BAL_FLD_DSCR="A ctual Rate Amount">
<SUBDEAL SUB_Deal_ID="00 112-01" />
</BAL>
<BAL BAL_FLD_NUM="6" BAL_FLD_DSCR="A ctual Dispersion Amount">
<SUBDEAL SUB_Deal_ID="02 342-01" />
</BAL>
</TRAN>
</TRANS>
IEnumerable<XAt tributeICOA =
(from ddList in GxmlCOA.Descend ants("BAL").Att ributes()
select ddList).Distinc t();
So the distinct bal fields should be:
1) Text = "Actual Rate Amount"
Val = 3
2) Text = "Actual Rate Amount"
Val = 2
3) Text = "Actual Dispersion Amount"
Val = 6
Unfortunately, the LINQ query isn't working.