Load XML to asp:DataGrid : XML DataGrid « XML « ASP.Net

Load XML to asp:DataGrid

<%@ Page language="VB" runat="server" %>
<%@ Import namespace="System.Data" %>
<%@ Import namespace="System.XML" %>

<script language="vb" runat="server">
  Sub Page_Load()
    Dim xmlFilename As String 
    xmlFilename= "artists.xml"
    Dim newDataSet As New DataSet
    DataGrid1.DataSource = newDataSet
  End Sub

    <title>Data Grid Control example</title>
    <asp:DataGrid id="DataGrid1" runat="server"  />

<?xml version="1.0"?>
    <name>Vincent Van Gogh</name>
    <movement>Post Impressionism </movement>
    <birthdate>30th March 1853</birthdate>
    <name>Paul Klee </name>
    <nationality>Swiss </nationality>
    <movement>Abstract Expressionism </movement>
    <birthdate>18th December 1879</birthdate>
    <name>Max Ernst </name>
    <nationality>German </nationality>
    <movement>Surrealism </movement>
    <birthdate>2nd April 1891</birthdate>



Related examples in the same category

1.Bind XML file to DataSet and bind to asp datagrid
2.Read xml data and bind to datagrid in C#
3.DataSet read XML data and bind to asp datagrid
4.Bind data in XML to asp:DataGrid