arst06d
Programmer
- Nov 29, 2002
- 324
Hi
I'm using an XMLDatasource control in Visual Web Developer Express 2005, which reads the following xml file:
Here's the xmldatasource control
as you can see I'm trying to filter the data so that only nodes with an attribute type = "Account" is returned.
I have tried various permutations but I always get "Expression must evaluate to a node".
Any help will be appreciated.
(I have posted this in the ASP.Net forum, but was told to try here .....)
I'm using an XMLDatasource control in Visual Web Developer Express 2005, which reads the following xml file:
Code:
<accounts>
<account number="999999" type="Account" name="account name" ccy="GBP" balance="100.36" />
<account number="888888" type="Account" name="account name2" ccy="GBP" balance="-999.36" />
<account number="123456" type="CARD" name="Card name" ccy="GBP" balance="-258.99" />
</accounts>
Here's the xmldatasource control
Code:
<asp:XmlDataSource
ID="XmlDataSource1"
runat="server"
DataFile="~/Accounts/Accounts.xml"
XPath="/accounts/account[@type]='Account'" >
</asp:XmlDataSource>
as you can see I'm trying to filter the data so that only nodes with an attribute type = "Account" is returned.
I have tried various permutations but I always get "Expression must evaluate to a node".
Any help will be appreciated.
(I have posted this in the ASP.Net forum, but was told to try here .....)