XML 是一种提供描述格式的标记语言.
XML是一种自由形式的语言,允许自己定义标记,而不向HTML那样存在已经定义好的标记.

<?xml version="1.0" encoding="utf-8" ?>
<Menu>
 <MenuItem>
  <水果>
   苹果
  </水果>
  <价格>
   12.45
  </价格>
 </MenuItem>
 <MenuItem>
  <水果>
   香蕉
  </水果>
  <价格>
   3.89
  </价格>
 </MenuItem>
</Menu>


    protected void Page_Load(object sender, EventArgs e)
    {
        DataSet ds = new DataSet();
        ds.ReadXml(MapPath("Menu.xml"));
        this.MyGridView.DataSource = ds;
        this.MyGridView.DataBind();
    }

相关文章:

  • 2021-06-25
  • 2021-12-28
  • 2021-06-13
  • 2021-11-03
  • 2022-02-07
  • 2021-10-19
  • 2021-10-30
猜你喜欢
  • 2021-08-30
  • 2018-05-15
  • 2021-06-10
  • 2022-02-23
相关资源
相似解决方案