Continuing with DataSource controls, we now move on to the XmlDataSource control.  This perhaps could be an alternative to using our custom label controls, etc.  There might also be opportunities to extend this control in the future.  The XmlDataSource control allows you to bound a control to an XmlDocument (typically located in a file).  This is paritcularly useful when the data is hierarchical.  You can bind to things like the TreeView control or SiteMap.  As with all of the other DataSource controls.  This control supports caching as well.
 
To use the XmlDataSource control simply specify the path to a file using the DataFile property.  You can then set use XPath commands to get the value of nodes.  Take a look at the example below.  It uses a repeater to display the contents of an XML file.  To bind to a DataSource, you always use the DataSourceId property and set it to the name of the control providing the data (this is typically done for you by a wizard).
<asp:XmlDataSource runat="server" id="XmlDataSource1" 
DataFile="ReservationLabels_en-US.xml" />

<asp:repeater runat="server" id="Repeater1" DataSourceId="XmlDataSource1">
   <ItemTemplate>
        <!-- Insert xhtml formatting here -->
        <%# XPath ("ReservationsLabels/Label/@key") %>
        <%# XPath ("ReservationsLabels/Label/@value") %>
  </ItemTemplate>
</asp:repeater>
This is a simple example that would print out the values of the ResevationLabels_en-US.xml file.  If you have a hierachical file you can even use repeaters inside repeaters to display child nodes.  Note the new use of the XPath keyword inside the data binding blocks.  This control will probably prove to be pretty useful.  I see a lot of potential with it when it is extended.

Read the complete post at http://www.dotnettipoftheday.com/blog.aspx?id=110