all groups > dotnet xml > september 2006 >
You're in the

dotnet xml

group:

New at this


New at this ampeloso NO[at]SPAM gmail.com
9/26/2006 8:54:22 AM
dotnet xml:
I have the following:
<?xml version="1.0" encoding="utf-8" ?>
<Football>
<Week>1
<Player>
MikeP
</Player>
<Team>
Seattle
</Team>
</Week>
<Week>1
<Player>
AnnaP
</Player>
<Team>
IDONTKNOW
</Team>
</Week>
</Football>


and I want to put it in a Grid View but Im getting an error.

The datasource for gridview with id "gridview1" did not have any
properties or attribites from which to create columns.

How would I recreate this to get:

Week 1 2 3
MikeP Seattle
AnnaP IDONTKNOW
.....

Thanks
Mike
Also some resourses for working with xml files with the gridview
Re: New at this Alex Krawarik[MSFT]
9/26/2006 4:14:08 PM
Your data is not currently well structured, and your values for week need to
be captured within the XML structure. Think about the relationships between
Football, Week, Team, and Player. Are they clear from your proposed XML
blob? No.

So try something like this

<Football>
<Week weekofplay='1'>
<Team name ='Seattle'>
<Player>AnnaP</Player>
</Team>
<Team name='Undetermined'>
<Player>MikeP</Player>
</Team>
</Week>
<Week weekofplay='2'>
<Team name ='Seattle'>
<Player>AnnaP</Player>
</Team>
<Team name='Undetermined'>
<Player>MikeP</Player>
</Team>
</Week>
</Football>


[quoted text, click to view]

AddThis Social Bookmark Button