I'm trying to bind some XML data to a gridview.
Obviously I'm not understanding how to do it properly because that my code doesn't seem to
work...Can anyone could help me please?
this is my xml:
and this is my code:
Obviously I'm not understanding how to do it properly because that my code doesn't seem to
work...Can anyone could help me please?
this is my xml:
Code:
######################################### <?xml version "1.0" encoding "utf-8"?> <dictionary> <item> <key> <string> hello world </string> </key> <value> <anytype xmlns:q1="http://www.w3.org/2001/XMLSchame" d4p1:type="q1:int" xmlns:d4p1="http-instance">45</anytype> </value> </item> </dictionary>
Code:
######################################## string path = "D:\\myXmlFile.xml"; DataSet oDs = new DataSet(); oDs.ReadXml(path); GridView1.DataSource = oDs; GridView1.DataBind();
Comment