Mono Class Library: System.Xml.XmlTextWriter Overview | Members

System.Xml.XmlTextWriter.Indentation Property

Gets or sets how many indentation characters to write for each level in the hierarchy when XmlTextWriter.Formatting is set to Formatting.Indented.

public int Indentation { set; get; }

Value

A int specifying the number of XmlTextWriter.IndentChar characters to use for each level. The default is 2.

Exceptions

TypeReason
ArgumentExceptionThe value to be set is less than zero.

Remarks

Indentation is performed on the following members of System.Xml.XmlNodeType: DocumentType, Element, Comment, ProcessingInstruction, and CDATA. All other node types are not affected. The System.Xml.XmlTextWriter class does not indent the internal DTD subset.

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0