Show / Hide Table of Contents

    Class XmlStreamConverter

    This utility class is designed to make XML System.IO.Stream related conversions easier to work with.

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

    Methods

    | Improve this Doc

    ChangeEncoding(Stream, Encoding)

    Converts the entire XML System.IO.Stream object from the resolved source encoding to the specified target encoding, preserving any preamble sequences.

    Declaration
    public static Stream ChangeEncoding(Stream source, Encoding targetEncoding)
    Parameters
    Type Name Description
    System.IO.Stream source

    The System.IO.Stream to apply the conversion to.

    System.Text.Encoding targetEncoding

    The target encoding format.

    Returns
    Type Description
    System.IO.Stream

    A System.IO.Stream object containing the results of converting bytes from the resolved source encoding to the specified targetEncoding.

    | Improve this Doc

    ChangeEncoding(Stream, Encoding, PreambleSequence)

    Converts the entire XML System.IO.Stream object from the resolved encoding of source to the specified encoding. If an encoding cannot be resolved from source, UTF-8 encoding is assumed.

    Declaration
    public static Stream ChangeEncoding(Stream source, Encoding targetEncoding, PreambleSequence sequence)
    Parameters
    Type Name Description
    System.IO.Stream source

    The System.IO.Stream to apply the conversion to.

    System.Text.Encoding targetEncoding

    The target encoding format.

    PreambleSequence sequence

    Determines whether too keep or remove any preamble sequences.

    Returns
    Type Description
    System.IO.Stream

    A System.IO.Stream object containing the results of converting bytes from the resolved source encoding to the specified targetEncoding.

    | Improve this Doc

    ChangeEncoding(Stream, Encoding, Boolean)

    Converts the entire XML System.IO.Stream object from the resolved encoding of source to the specified encoding. If an encoding cannot be resolved from source, UTF-8 encoding is assumed.

    Declaration
    public static Stream ChangeEncoding(Stream source, Encoding targetEncoding, bool omitXmlDeclaration)
    Parameters
    Type Name Description
    System.IO.Stream source

    The System.IO.Stream to apply the conversion to.

    System.Text.Encoding targetEncoding

    The target encoding format.

    System.Boolean omitXmlDeclaration

    if set to true omit the XML declaration; otherwise false. The default is false.

    Returns
    Type Description
    System.IO.Stream

    A System.IO.Stream object containing the results of converting bytes from the resolved source encoding to the specified targetEncoding.

    | Improve this Doc

    ChangeEncoding(Stream, Encoding, Encoding, PreambleSequence)

    Converts the entire XML System.IO.Stream object from one encoding to another.

    Declaration
    public static Stream ChangeEncoding(Stream source, Encoding sourceEncoding, Encoding targetEncoding, PreambleSequence sequence)
    Parameters
    Type Name Description
    System.IO.Stream source

    The System.IO.Stream to apply the conversion to.

    System.Text.Encoding sourceEncoding

    The source encoding format.

    System.Text.Encoding targetEncoding

    The target encoding format.

    PreambleSequence sequence

    Determines whether too keep or remove any preamble sequences.

    Returns
    Type Description
    System.IO.Stream

    A System.IO.Stream object containing the results of converting bytes from sourceEncoding to targetEncoding.

    | Improve this Doc

    ChangeEncoding(Stream, Encoding, Encoding, PreambleSequence, Boolean)

    Converts the entire XML System.IO.Stream object from one encoding to another.

    Declaration
    public static Stream ChangeEncoding(Stream source, Encoding sourceEncoding, Encoding targetEncoding, PreambleSequence sequence, bool omitXmlDeclaration)
    Parameters
    Type Name Description
    System.IO.Stream source

    The System.IO.Stream to apply the conversion to.

    System.Text.Encoding sourceEncoding

    The source encoding format.

    System.Text.Encoding targetEncoding

    The target encoding format.

    PreambleSequence sequence

    Determines whether too keep or remove any preamble sequences.

    System.Boolean omitXmlDeclaration

    if set to true omit the XML declaration; otherwise false. The default is false.

    Returns
    Type Description
    System.IO.Stream

    A System.IO.Stream object containing the results of converting bytes from sourceEncoding to targetEncoding.

    | Improve this Doc

    ChangeEncoding(Stream, Encoding, Encoding, Boolean)

    Converts the entire XML System.IO.Stream object from one encoding to another.

    Declaration
    public static Stream ChangeEncoding(Stream source, Encoding sourceEncoding, Encoding targetEncoding, bool omitXmlDeclaration)
    Parameters
    Type Name Description
    System.IO.Stream source

    The System.IO.Stream to apply the conversion to.

    System.Text.Encoding sourceEncoding

    The source encoding format.

    System.Text.Encoding targetEncoding

    The target encoding format.

    System.Boolean omitXmlDeclaration

    if set to true omit the XML declaration; otherwise false. The default is false.

    Returns
    Type Description
    System.IO.Stream

    A System.IO.Stream object containing the results of converting bytes from sourceEncoding to targetEncoding.

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