public static CreateDictionaryWriter ( System writer ) : System.Xml.XmlDictionaryWriter | ||
writer | System | |
리턴 | System.Xml.XmlDictionaryWriter |
static public XmlDictionaryWriter CreateTextWriter(Stream stream, Encoding encoding, bool ownsStream) { XmlWriterSettings settings = new XmlWriterSettings(); if (s_UTF8Encoding.WebName == encoding.WebName) { settings.Encoding = s_UTF8Encoding; } else { settings.Encoding = encoding; } settings.CloseOutput = ownsStream; settings.NewLineHandling = NewLineHandling.Entitize; settings.OmitXmlDeclaration = true; settings.CheckCharacters = false; return(XmlDictionaryWriter.CreateDictionaryWriter(XmlWriter.Create(stream, settings))); }
static public XmlDictionaryWriter CreateTextWriter(Stream stream, Encoding encoding, bool ownsStream) { #if NET_NATIVE || MERGE_DCJS XmlUTF8TextWriter writer = new XmlUTF8TextWriter(); writer.SetOutput(stream, encoding, ownsStream); return(writer); #else XmlWriterSettings settings = new XmlWriterSettings(); if (s_UTF8Encoding.WebName == encoding.WebName) { settings.Encoding = s_UTF8Encoding; } else { settings.Encoding = encoding; } settings.CloseOutput = ownsStream; settings.NewLineHandling = NewLineHandling.Entitize; settings.OmitXmlDeclaration = true; settings.CheckCharacters = false; return(XmlDictionaryWriter.CreateDictionaryWriter(XmlWriter.Create(stream, settings))); #endif }