Click or drag to resize
XmlExtensionsToFormattedXmlString Method
Returns formatted XML content.

Namespace: CMS.Helpers
Assembly: CMS.Helpers (in CMS.Helpers.dll) Version: 13.0.131
Syntax
C#
public static string ToFormattedXmlString(
	this XmlDocument document,
	bool omitXmlDeclaration = false
)

Parameters

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

Return Value

Type: String

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