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]

Usage Syntax

oMXXMLWriter.encoding = strValue
strValue = oMXXMLWriter.encoding

Remarks

String. Read/write. The default string is empty, that is, UTF-16. Microsoft® Visual Basic® strings are always UTF-16 encoded. If your output is a string, the encoding parameter is ignored.

[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

The default string is empty, that is, UTF-16.

If your output is a string, the encoding parameter is ignored.

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

See Also

Character Encoding, XML, and MSXML

Applies to: MXXMLWriter CoClass