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

把datatable里的数据转换成xml格式的字符串

string GetXmlByDataTable()
    {
        string xmlstr;
        string sql = "select top 10 * from BasicInfo";
        DataTable dt = idb.ReturnDataTable(sql);
        dt.TableName = "tbname";
        if (dt.Rows.Count>0)
        {
            System.IO.StringWriter writer = new System.IO.StringWriter();
            dt.WriteXml(writer);
            xmlstr = writer.ToString();
        }
        return xmlstr;
    }


相关文档:

js 读取xml文档

<html>
<head>
<title>XML Demo</title>
</head>
<body>
<script language="javascript">
function window.onload()
{
var domXML=new ActiveXObject("Microsoft.xmldom");
domXML.load("aTest.xml");
var myRoot=domXML.documentElement;
var myNodes2=myRoot.child ......

在XML文件中读取属性文件(.properties)中的元素值

在XML文件中读取属性文件(.properties)中的元素值:
web.xml
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/conf/dataAccessContext.xml</param-value>
</context-param>

<listener>
<listener-class>
......

Integration with the XML Data Type

Integration with the XML Data Type
With the introduction of the XML data type, we wanted to also give FOR XML the ability to generate an instance of XML directly (more precisely, it generates a single row, single column rowset where the cell contains the XML data type instance).
Because of the bac ......

操作XML,对XML的增删改查操作。asp.net C#

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
namespace jiu ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号