Click or drag to resize
XmlExtensionsWriteFormattedXmlToStream Method
Writes formatted XML content to given stream.

Namespace: CMS.Helpers
Assembly: CMS.Helpers (in CMS.Helpers.dll) Version: 9.0.0
Syntax
C#
public static void WriteFormattedXmlToStream(
	this XmlDocument document,
	Stream stream,
	bool omitXmlDeclaration = false
)

Parameters

document
Type: System.XmlXmlDocument
XML document
stream
Type: System.IOStream
The stream to write to.
omitXmlDeclaration (Optional)
Type: SystemBoolean
If true, the XML declaration is not included into the output.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type XmlDocument. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptiondocument is null.
Remarks
Ensures indentation and line breaking after each element.
See Also