Partager via


indent Property

 

Sets whether to indent output. When set to True, this property indents output for "pretty printing" to reflect the nesting structure of the document.

Visual Basic Usage Syntax

oMXXMLWriter.indent = boolValue  
boolValue = oMXXMLWriter.indent  

C/C++ Syntax

 [propput]  
HRESULT indent (  
   [in] VARIANT_BOOL fIndentMode);  
  
[propget]  
HRESULT indent (  
   [out, retval] VARIANT_BOOL * fIndentMode);  

Parameters

fIndentMode
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 is False. The general rules of indenting elements are: XML headers and root elements start on a new line with a zero indent; element content, including leading and trailing white spaces, is not changed in any way.

The default of this property is False. Because there is no way to detect white space inside an internal document type definition (DTD), they are always indented.

Value Description
True Provide white space for formatting.
False No additional indenting requirement.

Versioning

Implemented in: MSXML 3.0 and later

Applies to

MXXMLWriter CoClass

See Also

Sample XML File (books.xml)