byte[] videobytes = File.ReadAllBytes("C:test.wmv"); string result = System.Convert.ToBase64String(videobytes); // Create the XmlDocument. XmlDocument xmlDoc = new XmlDocument(); XmlDeclaration xmlDeclaration = xmlDoc.CreateXmlDeclaration("1.0", "utf-8", null); // Add a price element. XmlElement rootNode = xmlDoc.CreateElement("Clip"); xmlDoc.InsertBefore(xmlDeclaration, xmlDoc.DocumentElement); xmlDoc.AppendChild(rootNode); XmlWriterSettings settings = new XmlWriterSettings(); settings.Indent = true; xmlDoc.Load(result); // Save the document to a file and auto-indent the output. XmlWriter writer = XmlWriter.Create("C:data.xml", settings); xmlDoc.Save(writer);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)