コード例 #1
0
 /// <summary>
 /// Creates a text reader that will replace invalid XML chars with whitespace
 /// so that the XML parser will not abort while reading the XML.
 /// </summary>
 /// <param name="reader"></param>
 public static TextReader CreateSafeTextReader(TextReader reader)
 {
     if (!(reader is SafeXmlTextReader))
     {
         reader = new SafeXmlTextReader(reader);
     }
     return(reader);
 }
コード例 #2
0
 /// <summary>
 /// Creates a text reader that will replace invalid XML chars with whitespace
 /// so that the XML parser will not abort while reading the XML.
 /// </summary>
 /// <param name="reader"></param>
 public static TextReader CreateSafeTextReader(TextReader reader)
 {
     if (!(reader is SafeXmlTextReader))
     {
         reader = new SafeXmlTextReader(reader);
     }
     return reader;
 }