ToXmlReader Method
Definition
- Namespace
- Cuemon.Extensions.Xml
- Assemblies
- Cuemon.Extensions.Xml.dll
ToXmlReader(Stream, Encoding, Action<XmlReaderSettings>)
Converts the given value to an XmlReader.
public static XmlReader ToXmlReader(this Stream value, Encoding encoding = null, Action<XmlReaderSettings> setup = null)
Parameters
valueStreamThe XML Stream to extend.
encodingEncodingThe text encoding to use.
setupAction<XmlReaderSettings>The XmlReaderSettings which may be configured.
Returns
Remarks
If encoding is null, an Encoding object will be attempted resolved by TryDetectXmlEncoding(Stream, out Encoding).
Exceptions
- ArgumentNullException
valuecannot be null.