/// <summary> /// 得到某个节点下指定子节点属性值 /// </summary> /// <param name="path"></param> /// <param name="attrName"></param> /// <returns></returns> private string GetXmlNodeAndAttr(string path, string nodeAttr, string nodeValue, string nodeName, string attrName) { SuperMesServer.Xml.ReadXml readXml = new SuperMesServer.Xml.ReadXml(); XmlNodeList nodeList = readXml.ReadNodeListFromFile("dbconnect.xml", path); XmlNode node = readXml.ReadNodeFromNodeListByNodeAttr(nodeList, nodeAttr, nodeValue); XmlNodeList listChild = readXml.ReadNodeListFromNode(node); XmlNode nodeChild = readXml.ReadNodeFromNodeListByNodeName(listChild, nodeName); return(readXml.ReadAttrFromNode(nodeChild, attrName)); }