public SysConfigModel loadConfig(string configPath) { SysConfigModel sysConfigModel = null; if (File.Exists(configPath)) { System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument(); xmlDoc.Load(configPath); sysConfigModel = XmlUtil <SysConfigModel> .Deserialize(xmlDoc.ToString()); } return(sysConfigModel); }
string htmlTable(string table, int row, int column) { var result = "No such cell"; var xml = new System.Xml.XmlDocument(); xml.LoadXml(table); Console.WriteLine(xml.ToString()); var rows = xml.SelectNodes("/table/tr"); if (rows.Count > row) { var cells = rows[row].SelectNodes("td"); if (cells.Count > column) { result = cells[column].InnerText; } } return(result); }