编程语言

img bgu

[ASP/ASP.net]最简单的XML运用

发表于2004/10/22 13:44:00  858人阅读

分类: [My ASP/ASP.net(C#)]

XML控件:
  protected System.Web.UI.WebControls.Xml xmlList;

数据源梆定:
=============================

   xmlList.DocumentSource = "TestXml.xml";
   xmlList.TransformSource = "TestXsl.xslt";
   xmlList.DataBind();

=============================

数据对像调用,生成HTML文件。

=============================

   XmlDocument doc = new XmlDocument();
   doc.Load(Server.MapPath("TestXml.xml"));
   XslTransform trans = new XslTransform();
   trans.Load(Server.MapPath("TestXsl.xslt"));
   xmlList.Document = doc;
   xmlList.Transform = trans;
   trans.Transform(Server.MapPath("TestXml.xml"),Server.MapPath("TextHtml.html"));

=============================
阅读全文
0 0

相关文章推荐

img
取 消
img