最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
XSLT / XML / C
时间:2022-07-02 11:47:27 编辑:袖梨 来源:一聚教程网
XSLT / XML / C# (转)
这个例程展示了如何将xslt 应用于从数据库中读出的xml格式数据上. 例程完全使用C#语言编写:
using System;
using System.Collections;
using System.Data;
using System.Data.SqlClient;
using System.Xml;
using System.Xml.Xsl;
public class XsltTransform
{
public static void Transform()
{
SqlConnection nwindConn = new SqlConnection("Data
Source=INMUMIS123;database=northwind;uid=sa;pwd=;");
nwindConn.Open();
DataSet custDS = new DataSet("CustomerDataSet");
SqlDataAdapter custDA = new SqlDataAdapter("SELECT * FROM Customers",
nwindConn);
custDA.Fill(custDS, "Customers");
SqlDataAdapter ordersDA = new SqlDataAdapter("SELECT * FROM Orders",
nwindConn);
ordersDA.Fill(custDS, "Orders");
nwindConn.Close();
custDS.Relations.Add("CustOrders",
custDS.Tables["Customers"].Columns["CustomerID"],
这个例程展示了如何将xslt 应用于从数据库中读出的xml格式数据上. 例程完全使用C#语言编写:
using System;
using System.Collections;
using System.Data;
using System.Data.SqlClient;
using System.Xml;
using System.Xml.Xsl;
public class XsltTransform
{
public static void Transform()
{
SqlConnection nwindConn = new SqlConnection("Data
Source=INMUMIS123;database=northwind;uid=sa;pwd=;");
nwindConn.Open();
DataSet custDS = new DataSet("CustomerDataSet");
SqlDataAdapter custDA = new SqlDataAdapter("SELECT * FROM Customers",
nwindConn);
custDA.Fill(custDS, "Customers");
SqlDataAdapter ordersDA = new SqlDataAdapter("SELECT * FROM Orders",
nwindConn);
ordersDA.Fill(custDS, "Orders");
nwindConn.Close();
custDS.Relations.Add("CustOrders",
custDS.Tables["Customers"].Columns["CustomerID"],
相关文章
- 物华弥新三兔藻器者怎么样 08-26
- 为了吾王学识商店如何解锁 08-26
- 我的花园世界合种怎么组队 08-26
- 逆水寒手游育宠及新宠物有哪些内容 08-26
- 赛尔号巅峰之战索伦森关卡怎么通关 08-26
- 物华弥新鸟音山水钟有什么玩法技巧 08-26