title: ASP.NET XML as Datasource error
body: <p>I am trying to use an XML as a datasource in ASP and then display it as a datagrid.  The XML has the following format:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;people type="array"&gt;
    &lt;person&gt;
      &lt;id type="integer"&gt;&lt;/id&gt;
      &lt;first_name&gt;&lt;/first_name&gt;
      &lt;last_name&gt;&lt;/last_name&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;company&gt;&lt;/company&gt;
      &lt;tags&gt;
      &lt;/tags&gt;
      &lt;locations&gt;
        &lt;location primary="false" label="work"&gt;
          &lt;email&gt;&lt;/email&gt;
          &lt;website&gt;&lt;/website&gt;
          &lt;phone&gt;&lt;/phone&gt;
          &lt;cell&gt;&lt;/cell&gt;
          &lt;fax&gt;&lt;/fax&gt;
          &lt;street_1/&gt;
          &lt;street_2/&gt;
          &lt;city/&gt;
          &lt;state/&gt;
          &lt;postal_code/&gt;
          &lt;country/&gt;
        &lt;/location&gt;
      &lt;/locations&gt;
      &lt;notes&gt;&lt;/notes&gt;
      &lt;created_at&gt;&lt;/created_at&gt;
      &lt;updated_at&gt;&lt;/updated_at&gt;
    &lt;/person&gt;
  &lt;/people&gt;
  </code></pre>
  
  <p>When I try to run the simple page I receive the following error</p>
  
  <pre><code>Server Error in '/' Application.
  The data source for GridView with id 'GridView1' did not have any properties or attributes from which to generate columns.  Ensure that your data source has content.
  </code></pre>
  
  <p>Here is my page code</p>
  
  <pre><code>&lt;%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="shout._Default" %&gt;
  
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml" &gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;Untitled Page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
      &lt;div&gt;
          &lt;asp:XmlDataSource ID="XmlDataSource1" runat="server" 
              DataFile="~/App_Data/people.xml" XPath="people/person"&gt;&lt;/asp:XmlDataSource&gt;
          &lt;asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
              DataSourceID="XmlDataSource1"&gt;
          &lt;/asp:GridView&gt;
  
      &lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Please help.  Thanks in advance.</p>