易截截图软件、单文件、免安装、纯绿色、仅160KB

【C#】XSLT转换XML实例

产品几年前使用ASP,后来升级到.Net 1.1,再升级到2.0,一直都有用XSLT转换XML生成网页的方式,稍微整理下。
    XML file:
<?xml version="1.0" encoding="utf-8" ?>
<ric>
  <catalog>
    <book price="75">
      <author>Kalen Delaney</author>
      <name>Inside SQL Server 2000</name>
    </book>
    <book price="200">
      <author>Ken Henderson</author>
      <name>The Guru's Guide to SQL Server Architecture</name>
    </book>
  </catalog>
</ric>
    XSLT file:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="utf-8"/>
<xsl:template match="/">
    <html>
    <body>
      <table cellpadding="0" cellspacing="0" border="1" style="border-collapse:collapse;font-size:14px;">
        <tr>
          <th>Book Name</th>
          <th>Author</th>
          <th>Price</th>
        </tr>
      &nb


相关文档:

利用SqlHelper(ExecuteXmlReader使用),转换到xml格式

利用sqlhelper中的ExcuteXmlReader方法,读取数据并保存为xml文件     
 string strConn = Properties.Settings.Default.Connections;
           SqlConnection connection = new SqlConnection(strConn);
    & ......

xml解析



 
使用SAX解析和DOM解析的实例
收藏



document.body.oncopy = function() {
if (window.clipboardData) {
s ......

java解析xml的具体流程

java 代码
import javax.xml.parsers.DocumentBuilder;   
import javax.xml.parsers.DocumentBuilderFactory;   
  
import org.w3c.dom.Document;   
import org.w3c.dom.Element;   
import org.w3c.dom.NodeList;    ......

XML增\删、改、查简单操作

  protected void Page_Load(object sender, EventArgs e)
    {
        lblValue.Text = string.Format("{0:N}", 2500000);
        lblValue.Text = string.Format("{0:C3}", 2);
       ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号