App_Code/XmlDatabase.cs
(开头部分) 11KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Text;
using System.Xml;
using System.Xml.XPath;
using System.Collections;
using System.Data;
using MRSOFTASPNET.CommonOperation;
namespace MRSOFTASPNET.OperateXmlDatabase
{
public enum ParameterDirection
{
Insert, //插入
Update, //更新
Equal, //相等
NotEqual, //不相等
Little, //小于
Great, //大于
Like //模糊匹配
}
//定义该类为密封类,阻止该类被继承
public sealed class XmlParamter
{
//实例构造函数
public XmlParamter(){}
//定义属性Name
private string name;
public string Name
{
get { return this.name; }
set { this.name = value; }
}
//定义属性Value
private string value;
public string Value
{
get { return this.value; }
set { this.value = value; }
}
//定义属性Direction
private ParameterDirection direction;
public ParameterDirection Direction
{
get { return this.direction; }
set { this.direction = value; }
}
}
public class XmlDatabase
{
public XmlDatabase() { }
#region 获取XML中的数据
public static DataTable GetData(string path,string tableName)
{
//创建XmlDocument类的实例
XmlDocument xmldoc = new XmlDocument();
//调用XmlDocument类中的Load()方法加载XML文件
xmldoc.Load(path);
//创建DataTable类型的变量dt
后面还有 328 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。