C#读取XML文件的简单方法
一、XML只有一个Table的情况
(1)userInfo.xml
<?xml version="1.0" encoding="utf-8" ?>
<UserInfo>
<user userName ="张三" sex ="男" dept="财务部门"/>
<user userName ="李四" sex ="女" dept="资讯部门"/>
<user userName ="王五" sex ="男" dept="生产部门"/>
</UserInfo>
(2)读取资料
DataSet ds = new DataSet();
ds.ReadXml(@"userInfo.xml");
dataGridView1.DataSource = ds.Tables["user"];
二、XML有多个Table的情况
(1)userInfo.xml
<?xml version="1.0" encoding="utf-8" ?>
<SystemData>
<user id ="1">
<userName>张三</userName>
<sex>男</sex>
<dept>财务部门</dept>
</user>
<user id="2">
<userName>李四</userName>
<sex>女</sex>
<dept>资讯部门</dept>
</user>
<user id="3">
<userName>王五</userName>
<sex>男</sex>
 
相关文档:
以下分析基于:
Developer Platform :S60 3rd Edition, Feature Pack 2 SDK
Operating System :Symbian OS v9.3
一,为什么要使用Client/Server架构
在Symibian OS中所有的异步服务都是Server通过C/S架构来实现的。Client是利用Server提供的特定服务的程序,Server接受来至Client的请求消息并同步或异步的处理他们。C ......
参考《linux内核完全注释》和网上相关文章
/*
* 控制台显示操作
*/
/*
* linux/kernel/console.c
*
* (C) 1991 Linus Torvalds
*/
/*
* console.c
*
* This module implements the console io functions
* 'void con_init(v ......
源xml文件
<?xml version="1.0" encoding="iso-8859-1"?>
<books>
<stock>
<name>The Picasso Code</name>
<author>Dan Blue</author>
<category>Fiction</category>
<description>Cubist paintings reveal a secret society of people ......
C/C++关键字static,const,inline,define,typedef
document.body.oncopy = function() {
if (window.clipboardData) {
setTimeout(function() {
......
今天第一次试着在Linux下写C程序,把遇到的问题记录一下
1. 使用emacs命令编辑程序文件,我直接在Terminal里输入了emacs,写好程序,关闭,结果和windows里不一样,并没有任何SaveFileDialog之类的对话框弹出来,自己写的东西也不知道保存到哪里了,而且File菜单里也没有New这样的选项。后来才知道,原来是得在emacs命令后 ......