encoding Property

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - SAX2 Reference

encoding Property

Sets and gets encoding for the output.

[Visual Basic]

Implementation Syntax

Property Let IMXWriter_encoding(ByVal RHS As String)
Property Get IMXWriter_encoding() As String

Usage Syntax

oMXXMLWriter.encoding = strValue
strValue = oMXXMLWriter.encoding

Remarks

String. Read/write. The default string is dependent on implementation. Microsoft® Visual Basic® strings are always UTF-16 encoded.

[C/C++]

Syntax

[propput]
HRESULT encoding (
   [in] BSTR strEncoding);
[propget]
HRESULT encoding (
   [out, retval] BSTR * strEncoding);

Parameters

strEncoding
The BSTR used to identify encoding.

Return Values

S_OK
The value returned if no errors are reported.

Remarks

Read/write. The default string is dependent on implementation.

The encoding property has no effect for BSTR or DOM output.

The XSLProcessor object implements the encoding property as follows:

  • When set, its value overrides the encoding that will be used when serializing the XSLT result tree.
  • When read, its value is the encoding that will be used to serialize the XSLT result tree. If the style sheet does not specify an encoding, the default encoding of "UTF-16" is returned.

To view reference information for Visual Basic or C/C++ only, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

Character Encoding, XML, and MSXML | MXHTMLWriter CoClass | MXXMLWriter CoClass

Applies to: IMXWriter Interface