读取XML文件中的某个节点的某个属性

XmlDocument xmlDocument = new XmlDocument();
    xmlDocument.Load(Path.Combine(HttpContext.Current.Request.PhysicalApplicationPath,"web.config"));
    XmlNode node = xmlDocument.SelectSingleNode("");
    if (node!= null)
    {
     m_MaxLength   = Convert.ToInt32(node.Value);
    }

posted on 2009-09-12 18:17  画一个圆圈  阅读(202)  评论(0编辑  收藏  举报

导航