Show / Hide Table of Contents

    Class XmlEncodingUtility

    This utility class is designed to make XML System.Text.Encoding operations easier to work with.

    Inheritance
    System.Object
    XmlEncodingUtility
    Namespace: Cuemon.Xml
    Assembly: Cuemon.Xml.dll
    Syntax
    public static class XmlEncodingUtility

    Methods

    | Improve this Doc

    ReadEncoding(Stream)

    Reads the System.Text.Encoding from the specified XML System.IO.Stream. If an encoding cannot be resolved, UTF-8 encoding is assumed for the System.Text.Encoding.

    Declaration
    public static Encoding ReadEncoding(Stream value)
    Parameters
    Type Name Description
    System.IO.Stream value

    The System.IO.Stream to resolve an System.Text.Encoding object from.

    Returns
    Type Description
    System.Text.Encoding

    An System.Text.Encoding object equivalent to the encoding used in the value, or System.Text.Encoding.UTF8 if unable to resolve the encoding.

    | Improve this Doc

    ReadEncoding(Stream, Encoding)

    Reads the System.Text.Encoding from the specified XML System.IO.Stream. If an encoding cannot be resolved, defaultEncoding encoding is assumed for the System.Text.Encoding.

    Declaration
    public static Encoding ReadEncoding(Stream value, Encoding defaultEncoding)
    Parameters
    Type Name Description
    System.IO.Stream value

    The System.IO.Stream to resolve an System.Text.Encoding object from.

    System.Text.Encoding defaultEncoding

    The preferred default System.Text.Encoding to use if an encoding cannot be resolved automatically.

    Returns
    Type Description
    System.Text.Encoding

    An System.Text.Encoding object equivalent to the encoding used in the value, or defaultEncoding if unable to resolve the encoding.

    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX