易截截图软件、单文件、免安装、纯绿色、仅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;
    }


相关文档:

在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>
......

关于XML中字节写入流字段时的说明

方法一:
      采取通用的base64编码方式,取时解码存时加码。
毛老师提供了完整的编码代码,且效率很高。
unit Base64;

interface

uses SysUtils, Classes;

type
{$IFDEF UNICODE}
Base64String = AnsiString;
{$ELSE}
Base64String = strin ......

DataSet、Excel、XML之间的导入导出

class ImportExportToExcel
{
public class ImportExportToExcel
{
private string strConn;
private System.Windows.Forms.OpenFileDialog openFileDlg = new System.Windows.Forms.OpenFileDialog();
private System.Windows.Forms.SaveFileDialog saveFi ......

操作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 ......

xml和java Bean的直接转换,Xmap

package test;
import java.util.ArrayList;
import java.util.List;

import org.nuxeo.common.xmap.annotation.XNode;
import org.nuxeo.common.xmap.annotation.XNodeList;
import org.nuxeo.common.xmap.annotation.XObject;


/**
* Book 实体对象,此处用XMap注解
* @author Administra ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号