/// <summary> /// Provides example code for the Save(Stream) method /// </summary> public static void SaveStreamExample() { OpmlDocument document = new OpmlDocument(); // Modify document state using public properties and methods using (Stream stream = new FileStream("OpmlDocument.xml", FileMode.Create, FileAccess.Write)) { document.Save(stream); } }
/// <summary> /// Provides example code for the Save(XmlWriter) method /// </summary> public static void SaveXmlWriterExample() { OpmlDocument document = new OpmlDocument(); // Modify document state using public properties and methods using (Stream stream = new FileStream("OpmlDocument.xml", FileMode.Create, FileAccess.Write)) { XmlWriterSettings settings = new XmlWriterSettings(); settings.Indent = true; using (XmlWriter writer = XmlWriter.Create(stream, settings)) { document.Save(writer); } } }