读取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);
    }
原文地址:https://www.cnblogs.com/xinzhuangzi/p/4100721.html