資源簡介
這篇文章(https://www.daboke.com)主要介紹了使用C#快速上手XML的增刪查改操作的方法。
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?System.xml;
using?System.IO;
namespace?xmlSample
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????DataSet?dataSet?=?new?DataSet();//聲明此數據集,存儲讀取出的xml數據
????????///?
????????///?創建xml的方法
????????///?
????????///?
????????///?
????????private?void?Button5_Click(object?sender?EventArgs?e)
????????{
????????????//創建一個xml文檔
????????????xmlDocument?doc?=?new?xmlDocument();
????????????//創建第一行描述信息
????????????xmlDeclarati
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2020-04-16?11:01??xm
?????目錄???????????0??2020-04-16?11:01??xm
?????目錄???????????0??2020-04-16?11:01??xm
?????目錄???????????0??2020-04-16?11:01??xm
?????文件???????47104??2020-04-16?20:46??xm
?????目錄???????????0??2020-04-16?11:01??xm
?????目錄???????????0??2020-04-16?20:46??xm
?????文件???????????0??2020-04-16?11:01??xm
?????文件??????573440??2020-04-16?20:46??xm
?????目錄???????????0??2020-04-16?20:45??xm
?????目錄???????????0??2020-04-16?15:52??xm
?????目錄???????????0??2020-04-16?20:47??xm
?????文件???????20480??2020-04-16?20:45??xm
?????文件???????36352??2020-04-16?20:45??xm
?????目錄???????????0??2020-04-16?15:52??xm
?????文件????????8475??2020-04-16?20:45??xm
?????文件???????29169??2020-04-16?19:29??xm
?????文件????????5817??2020-04-16?19:29??xm
?????目錄???????????0??2020-04-16?11:01??xm
?????目錄???????????0??2020-04-16?19:46??xm
?????文件????????1423??2020-04-16?18:15??xm
?????文件????????6899??2020-04-16?15:52??xm
?????目錄???????????0??2020-04-16?11:01??xm
?????文件??????????42??2020-04-16?15:52??xm
?????文件?????????847??2020-04-16?14:45??xm
?????文件????????1012??2020-04-16?19:36??xm
?????文件????????2201??2020-04-16?19:46??xm
?????文件???????20480??2020-04-16?20:45??xm
?????文件?????????180??2020-04-16?19:36??xm
?????文件???????36352??2020-04-16?20:45??xm
?????文件?????????180??2020-04-16?15:54??xm
............此處省略9個文件信息
評論
共有 條評論