private void result(){ XmlDocument xml = new XmlDocument(); xml.Load(myXmlPath); // the path of your xml file // you can use xml.LoadXml(xmlText); if xmlText contains all of your xml result = xml.SelectSingleNode("/DATA/MCFloorRate").InnerText;}
Carl TawnSystems and Integration DeveloperCommented:
SqlConnection cn = new SqlConnection("your connection string");SqlCommand cmd = new SqlCommand("SELECT xmlbilling FROM customers WHERE customerId = 1", cn);cn.Open();string xml = (string)cmd.ExecuteScalar();cn.Close();XmlDocument doc = new XmlDocument();doc.LoadXml(xml);string value = string.Empty;XmlNode node = doc.SelectSingleNode("//MCFloorRate");if (node != null) value = node.InnerText;
Open in new window