title: Gridview binding to XML
body: <p>I am trying to make a simple grid view that is binded to a simple xml document but I must be missing something since I am keep getting error message:</p>
  
  <blockquote>
    <p>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.</p>
  </blockquote>
  
  <p>Code</p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server" DataSourceID="XmlDataSource1"&gt;
      &lt;Columns&gt;
          &lt;asp:BoundField DataField="id" HeaderText="ID" SortExpression="id" /&gt;
      &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  &lt;asp:XmlDataSource ID="XmlDataSource1" runat="server" 
      DataFile="Notifications.xml" XPath="/data/node"&gt;&lt;/asp:XmlDataSource&gt;
  </code></pre>
  
  <p>XML</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;data&gt;
    &lt;node&gt;
      &lt;id&gt;1096&lt;/id&gt;
      &lt;name&gt;About Us&lt;/name&gt;
      &lt;date&gt;21/12/2009 17:03:43&lt;/date&gt;
      &lt;user id="1"&gt;writer&lt;/user&gt;
    &lt;/node&gt;
    &lt;node&gt;
      &lt;id&gt;1099&lt;/id&gt;
      &lt;name&gt;News&lt;/name&gt;
      &lt;date&gt;21/12/2009 17:03:47&lt;/date&gt;
      &lt;user id="1"&gt;writer&lt;/user&gt;
    &lt;/node&gt;
    &lt;node&gt;
      &lt;id&gt;1098&lt;/id&gt;
      &lt;name&gt;Another page&lt;/name&gt;
      &lt;date&gt;21/12/2009 17:03:52&lt;/date&gt;
      &lt;user id="1"&gt;writer&lt;/user&gt;
    &lt;/node&gt;
  &lt;/data&gt;
  </code></pre>
  
  <p>Is it perhaps my xpath that is wrong or am I making something fundamentally wrong here?</p>