資源簡介
代碼片段和文件信息
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.IO;
using?System.xml;
using?System.xml.Linq;
namespace?CreatexmlByLINQ
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????static?string?strPath?=?“Employee.xml“;
????????//創(chuàng)建xml文件
????????private?void?button1_Click(object?sender?EventArgs?e)
????????{
????????????XDocument?doc?=?new?XDocument(
????????????????new?XDeclaration(“1.0“?“utf-8“?“yes“)
????????????????new?XElement(textBox1.Text
????????????????????new?XElement(textBox2.Text?new?XAttribute(textBox3.Text?textBox10.Text)
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????935??2009-02-12?10:42??sj\01\Createxm
?????文件???????24064??2009-02-12?10:48??sj\01\Createxm
?????文件????????3776??2009-02-12?10:45??sj\01\Createxm
?????文件????????1172??2009-02-12?10:47??sj\01\Createxm
?????文件???????13563??2009-02-12?10:45??sj\01\Createxm
?????文件????????5814??2009-02-12?10:45??sj\01\Createxm
?????文件?????????496??2009-02-12?10:42??sj\01\Createxm
?????文件???????12800??2009-02-12?10:47??sj\01\Createxm
?????文件???????22016??2009-02-12?10:47??sj\01\Createxm
?????文件???????14328??2009-02-12?10:46??sj\01\Createxm
?????文件?????????884??2009-02-12?10:47??sj\01\Createxm
?????文件?????????847??2009-02-12?10:47??sj\01\Createxm
?????文件???????12800??2009-02-12?10:47??sj\01\Createxm
?????文件?????????180??2009-02-12?10:47??sj\01\Createxm
?????文件???????22016??2009-02-12?10:47??sj\01\Createxm
?????文件?????????180??2009-02-12?10:47??sj\01\Createxm
?????文件????????1386??2009-02-12?10:42??sj\01\Createxm
?????文件????????2880??2009-02-12?10:42??sj\01\Createxm
?????文件????????5612??2009-02-12?10:42??sj\01\Createxm
?????文件????????1100??2009-02-12?10:42??sj\01\Createxm
?????文件?????????249??2009-02-12?10:42??sj\01\Createxm
?????文件?????????932??2009-02-12?10:48??sj\02\Queryxm
?????文件???????27648??2009-02-12?11:01??sj\02\Queryxm
?????文件????????1857??2009-02-12?10:51??sj\02\Queryxm
?????文件????????6612??2009-02-12?10:51??sj\02\Queryxm
?????文件????????5814??2009-02-12?10:50??sj\02\Queryxm
?????文件?????????495??2009-02-12?10:48??sj\02\Queryxm
?????文件????????3774??2009-02-12?10:51??sj\02\Queryxm
?????文件?????????382??2009-02-12?10:53??sj\02\Queryxm
?????文件???????11776??2009-02-12?10:53??sj\02\Queryxm
?????文件???????22016??2009-02-12?10:53??sj\02\Queryxm
............此處省略35個文件信息
評論
共有 條評論