AODL.Document.TextDocuments.DocumentManifest.DTDReplacer C# (CSharp) Метод

DTDReplacer() приватный Метод

DTDs the replacer, XmlDocument couldn't be loaded because the DTD wasn't found
private DTDReplacer ( string file ) : void
file string The file.
Результат void
		private void DTDReplacer(string file)
		{
			string text				= null;
			using (StreamReader sr = new StreamReader(file))
			{
				String line;
				while ((line = sr.ReadLine()) != null)
					text			+= line;
				sr.Close();
			}
			//replace it
			text					= text.Replace("<!DOCTYPE manifest:manifest PUBLIC \"-//OpenOffice.org//DTD Manifest 1.0//EN\" \"Manifest.dtd\">", "");
			//Overwrite it
			FileStream fstream		= File.Create(file);
			StreamWriter swriter	= new StreamWriter(fstream);
			swriter.WriteLine(text);
			swriter.Close();
			fstream.Close();
		}
	}