//Saves out the to the file with exact content in the XmlDocument. public virtual void Save(Stream outStream) { XmlDOMTextWriter xw = new XmlDOMTextWriter(outStream, TextEncoding); if (preserveWhitespace == false) { xw.Formatting = Formatting.Indented; } WriteTo(xw); xw.Flush(); }
//Saves out the to the file with exact content in the XmlDocument. public virtual void Save(Stream outStream) { XmlDOMTextWriter xw = new XmlDOMTextWriter(outStream, TextEncoding); if (_preserveWhitespace == false) xw.Formatting = Formatting.Indented; WriteTo(xw); xw.Flush(); }
public virtual void Save(string filename) { if (this.DocumentElement == null) { throw new XmlException("Xml_InvalidXmlDocument", Res.GetString("Xdom_NoRootEle")); } XmlDOMTextWriter w = new XmlDOMTextWriter(filename, this.TextEncoding); try { if (!this.preserveWhitespace) { w.Formatting = Formatting.Indented; } this.WriteTo(w); w.Flush(); } finally { w.Close(); } }
public virtual void Save( string filename ) { if ( DocumentElement == null ) throw new XmlException( Res.Xml_InvalidXmlDocument, Res.GetString( Res.Xdom_NoRootEle ) ); XmlDOMTextWriter xw = new XmlDOMTextWriter( filename, TextEncoding ); try { if ( preserveWhitespace == false ) xw.Formatting = Formatting.Indented; WriteTo( xw ); xw.Flush(); } finally { xw.Close(); } }
public virtual void Save(Stream outStream) { XmlDOMTextWriter w = new XmlDOMTextWriter(outStream, this.TextEncoding); if (!this.preserveWhitespace) { w.Formatting = Formatting.Indented; } this.WriteTo(w); w.Flush(); }