日期:2014-05-18 浏览次数:21052 次
private bool LoadXml(string strFilePath) { try { XmlDocument _doc = new XmlDocument(); _doc.Load(strFilePath); XmlNode node = _doc.SelectSingleNode("AISolution"); if (node != null) { return AIFileType.AI_FILE_TYPE_SOLUTION; } } catch (Exception ex) { MessageBox.Show("error"); return false; } }
namespace ConsoleApplication1 { class Program { static void Main(string[] args) { try { XmlDocument _doc = new XmlDocument(); _doc.Load("C:/test.txt"); XmlNode node = _doc.SelectSingleNode("AISolution"); } catch (Exception ex) { Console.WriteLine("Error"); } } } }