Class XmlReaderConverter
This utility class is designed to make System.Xml.XmlReader related conversions easier to work with.
Inheritance
Namespace: Cuemon.Xml
Assembly: Cuemon.Xml.dll
Syntax
public static class XmlReaderConverter
Methods
| Improve this DocFromBytes(Byte[])
Converts the given byte array to an XmlReader object.
Declaration
public static XmlReader FromBytes(byte[] value)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | value | The byte array to be converted. |
Returns
Type | Description |
---|---|
System.Xml.XmlReader | An System.Xml.XmlReader object. |
FromStream(Stream)
Converts the given stream to an XmlReader object.
Declaration
public static XmlReader FromStream(Stream value)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | value | The stream to be converted. |
Returns
Type | Description |
---|---|
System.Xml.XmlReader | An System.Xml.XmlReader object. |
FromStream(Stream, Encoding, Action<XmlReaderSettings>)
Converts the given stream to an XmlReader object.
Declaration
public static XmlReader FromStream(Stream value, Encoding encoding, Action<XmlReaderSettings> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | value | The stream to be converted. |
System.Text.Encoding | encoding | The text encoding to use. |
System.Action<System.Xml.XmlReaderSettings> | setup | The System.Xml.XmlReaderSettings which need to be configured. |
Returns
Type | Description |
---|---|
System.Xml.XmlReader | An System.Xml.XmlReader object. |
Remarks
If encoding
is null, an System.Text.Encoding object will be attempted resolved by ReadEncoding(Stream).
FromUri(Uri, Action<XmlReaderSettings>)
Converts the given URI to an XmlReader object.
Declaration
public static XmlReader FromUri(Uri value, Action<XmlReaderSettings> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | value | The URI to be converted. |
System.Action<System.Xml.XmlReaderSettings> | setup | The System.Xml.XmlReaderSettings which need to be configured. |
Returns
Type | Description |
---|---|
System.Xml.XmlReader | An System.Xml.XmlReader object. |