从xml检索数据 [英] retrieving datas from xml

查看:79
本文介绍了从xml检索数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从xml检索数据并将其显示在gridview中,对此的解决方案是什么.从此XML文件.....


Hi i want to retrieve the datas from xml and display it in gridview, what is the solution for this.From this XML file.....


<?xml version="1.0" encoding="utf-8"?>
<EmpolyeeDetails>
  <Employee EmpId="001">
    <Name>Admin</Name>
    <Designation>SalesMan</Designation>
    <Phone>343434</Phone>
    <Address>xxxxxxx</Address>
    <Password>temp@123</Password>
  </Employee>
  <Employee EmpId="002">
    <Name>Kamal</Name>
    <Designation>6546565</Designation>
    <Phone>SalesMan</Phone>
    <Address>testing</Address>
    <Password>temp@123</Password>
  </Employee>
</EmpolyeeDetails>

推荐答案

检查这些链接..

将xml绑定到网格 [到网格的XML [ xml文件转换为gridview [ ^ ]

希望这对您有帮助.
check these links..

bind xml to grid[^]

xml to grid[^]

xml file to gridview[^]

hope this helps..


尝试自己做一次.借助教程....
如果您发现任何困难,请在此处写下您的问题.
查看以下链接:
http://www.daniweb.com/web-development/aspnet/threads/91102 [ ^ ]
Try to do once yourself. With help of tutorials....
If u find any difficulty then write here about your problem.
View the link below:
http://www.daniweb.com/web-development/aspnet/threads/91102[^]


大不了?
DataSet ds = new DataSet();
ds.ReadXml("Filename.xml");
Gridview1.DataSource = ds;
Gridview1.DataBind();


这篇关于从xml检索数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆