DetailsView with XmlDataSource (perhaps XPath issue?)

DetailsView with XmlDataSource (perhaps XPath issue?)

am 27.01.2008 17:50:53 von pompair

Hello,

I'm making a quiz game for fun. I have an xml file like this:



99
11


1
question1


2
question2

... etc ...




Then I have DetailsView setup like this:

AllowPaging="True" AutoGenerateRows="False"
DataSourceID="ds1" DataKeyNames="id">

SortExpression="id" />
SortExpression="text" />




I have XmlDataSource setup like this:





Running the webform causes error: "A field or property with the name
'text' was not found on the selected data source".

The app works if I move the fields from elements to attributes!
Like this:



99
11


1


2

... etc....



So I guess it's a XPath problem in my XmlDataSource's XPath setting.
How to make this work with the original xml file (with the
fields as elementst)??

-pom-