获取XML文件某一个节点的值

public static string Select(string xmlpath, string xmlsinglenode)<br> {<br> try<br> {<br> XmlDocument xmlDoc = new XmlDocument();<br> xmlDoc.Load(xmlpath);<br> string selectString = xmlDoc.SelectSingleNode(xmlsinglenode).InnerText;<br> return selectString;<br> }<br> catch (Exception ex)<br> {<br> Log.SystemLog(ex.Message);<br> return "";<br> }<br> }

你可能感兴趣的:(xml)