共用方式為


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  

Visual Basic Usage Syntax

oMXXMLWriter.byteOrderMark = boolValue  
boolValue = oMXXMLWriter.byteOrderMark  

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

Boolean. Read/write.

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).

Versioning

Implemented in: MSXML 3.0 and later

Applies to

IMXWriter Interface

See Also

MXHTMLWriter CoClass
MXXMLWriter CoClass