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

Asp.Net XML操作基类(修改,删除,新增,创建)

Asp.Net XML操作基类(修改,删除,新增,创建)
2009-12-21 16:59
/**********************************************************************************
*
* 功能说明:XML处理基类
* 作者: 刘功勋;
* 版本:V0.1(C#2.0);时间:2006-12-13
*
* *******************************************************************************/
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using System.Xml;
using System.Text;
using MSXML2;
namespace EC
{
/// <summary>
/// XML 操作基类
/// </summary>
public class XmlObject : IDisposable
{     
       
//以下为单一功能的静态类
#region 读取XML到DataSet
/**************************************************
* 函数名称:GetXml(string XmlPath)
* 功能说明:读取XML到DataSet
* 参    数:XmlPath:xml文档路径
* 使用示列:
*          using EC; //引用命名空间
*          string xmlPath = Server.MapPath("/EBDnsConfig/DnsConfig.xml"); //获取xml路径
*          DataSet ds = EC.XmlObject.GetXml(xmlPath); //读取xml到DataSet中
************************************************/
/// <summary>
/// 功能:读取XML到DataSet中
/// </summary>
/// <param name="XmlPath">xml路径</param>
/// <returns>DataSet</returns>
public static DataSet GetXml(string XmlPath)
{
DataSet ds = new DataSet();
ds.ReadXml(@XmlPath);
return ds;
}
#endregion
        #region 读取xml文档并返回一个节点
/**************************************************
* 函数名称:ReadXmlReturnNode(string XmlPath,string Node)
* 功能说明:读取xml文档并返回一个节点:适用于一级节点
* 参  &


相关文档:

JSP/XML,JavaBean和CSS/XSL协同工作

1.在JSP中生成动态XML
  可以使用JSP生成XML,使用CSS或者XSL转换和显示XML;
  只要在静态的XML文档模板中加入Java代码和JSP标记,XML就可以有静变动,产生动态的内容,生成XML文档的方法很简单,只需要在文件中使用指令contenttype,如<%@ page contenttype="text/xml"%>;
  在XML文档中同样可以使 ......

ASP.NET程序中常用的三十三种代码


1. 打开新的窗口并传送参数: 
  传送参数:
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>")
  接收参数:
string a = Request.QueryString("id");
string b = Request.QueryStrin ......

ASP.NET按时间查询

select  top 6 *  from ViewHouseSale  where  1=1 and  (EstateType='0' or EstateType='1')
and DateDiff(day,PubDate,getdate()) <=7 and IfBenefit='Y' and IfValid='Y'  order by PubDate DESC
select  top 6 *  from ViewHouseSale  where  1=1 and&nb ......

ASP.net的url重写

1.
有关于URL的重写,本文也只是拿来主意。相继有MS的组件“URLRewriter”和在Global.asax里的“Application_BeginRequest()”编码方式,以及IIS里的ISAPI设置。
娜列下来,实现方法也都很简单。
 
方法一:MS组件
这里也不用详解了,相关请看:
http://www.microsoft.com/china/msdn/libra ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号