byteOrderMark Property

MSXML 5.0 SDK

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

byteOrderMark Property

Determines whether to write the Byte Order Mark (BOM) to output.

When set to True, IMXWriter follows XML 1.0 specifications and outputs BOM for appropriate encoding. When set to False, IMXWriter is prohibited from putting BOM into the resulting XML document.

[Visual Basic]

Implementation Syntax

Property Let IMXWriter_byteOrderMark(ByVal RHS As Boolean)
Property Get IMXWriter_byteOrderMark() As Boolean

Usage Syntax

oMXXMLWriter.byteOrderMark = boolValue
boolValue = oMXXMLWriter.byteOrderMark

Remarks

Boolean. Read/write. The byteOrderMark property has no effect for BSTR or DOM output.

[C/C++]

Syntax

[proput]
HRESULT byteOrderMark (
   [in] VARIANT_BOOL fWriteByteOrderMark);
[propget]
HRESULT byteOrderMark (
   [out, retval] VARIANT_BOOL * fWriteByteOrderMark);

Parameters

fWriteByteOrderMark
A Boolean expression (True/False) specifying whether the feature is on or off.

Return Values

S_OK
The value returned if no errors are reported.

Remarks

The default of this property depends on the implementation. IMXWriter never outputs BOM if the output is set to a string. The byteOrderMark property has no effect for BSTR or DOM output.

Value Description
True IMXWriter follows XML 1.0 specifications and outputs BOM for encoding.
False IMXWriter is prohibited from putting BOM into the resulting XML document.

The XSLProcessor object implements the byteOrderMark property as follows:

  • When set, its value overrides the byte-order-mark setting that controls whether a byte-order-mark will precede Unicode encoded output.
  • When read, its value is the current byte-order-mark setting. By default, this setting is a variant containing a value of True (VARIANT_TRUE).

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

MXHTMLWriter CoClass | MXXMLWriter CoClass

Applies to: IMXWriter Interface