当前位置:编程学习 > C#/ASP.NET >>

使用xmltextreader对xml进行简单的读取和写入操作

使用xmltextreader对xml文件进行简单的以对象形式的读取和写入操作
BaseSerializeElement
-------------------------------------------------------------
using System;
using System.Xml;
using System.Collections;
namespace Local.Framework.Common
{
 /// <summary>
 /// BaseXmlSerializer 的摘要说明。
 /// --fallseir.li 20050427 15:12
 /// </summary>
 public class BaseSerializeElement
 {
    public BaseSerializeElement()
    {
    }
    public BaseSerializeElement(XmlReader reader,bool isroot)
    {
     this._isroot=isroot;
     ReadXml(reader,isroot);
    }
    public BaseSerializeElement(XmlReader reader):this(reader,false){}
    #region attributes
    public bool IsRoot
    {
     get{return _isroot;}
    }
    private bool _isroot;
    public string TAG
    {
     get{return _tag;}
    }
    private string _tag;
    public string Value
    {
     get{return _value;}
    }
补充:asp.net教程,XML应用 
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,