string xmlString = ""; XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml(xmlString); John 30
string xmlFilePath = "data.xml"; string xmlString = File.ReadAllText(xmlFilePath); XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml(xmlString);
string xmlString = "Package Library: System.Xml. This namespace contains classes that provide comprehensive support for the XML schema definition language (XSD), XML Document Object Model (DOM), and Extensible Stylesheet Language Transformations (XSLT)."; try { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml(xmlString); } catch (Exception ex) { Console.WriteLine(ex.Message); } John 30