在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
概要描述:读取XML数据,最终生成Excel数据。
1<?xml version="1.0" encoding="utf-8" ?> 二.新建一个Default.aspx的页面,在Default.aspx页面上拖放一个按钮,双击进入按钮的事件,代码如下:2<bookstore xmlns="http://tempuri.org/Book.xsd"> 3 <book genre="autobiography" publicationdate="1981" ISBN="1-861003-11-0"> 4 <title>C# Program</title> 5 <author> 6 <first-name>Wang</first-name> 7 <last-name>Lei</last-name> 8 </author> 9 <price>10</price> 10 </book> 11 <book genre="novel" publicationdate="1967" ISBN="0-201-63361-2"> 12 <title>VB.Net Program</title> 13 <author> 14 <first-name>James</first-name> 15 <last-name>Wang</last-name> 16 </author> 17 <price>8</price> 18 </book> 19 <book genre="philosophy" publicationdate="1991" ISBN="1-861001-57-6"> 20 <title>Sql server 2005 database manager</title> 21 <author> 22 <first-name>Elvis</first-name> 23 <last-name>Yu</last-name> 24 </author> 25 <price>5</price> 26 </book> 27</bookstore>
1using System;
2using System.Data; 3using System.Configuration; 4using System.Web; 5using System.Web.Security; 6using System.Web.UI; 7using System.Web.UI.WebControls; 8using System.Web.UI.WebControls.WebParts; 9using System.Web.UI.HtmlControls; 10using System.IO; 11 12public partial class _Default : System.Web.UI.Page 13 |
请发表评论