XmlExtensionsToFormattedXmlString Method |
Returns formatted XML content.
Namespace: CMS.HelpersAssembly: CMS.Helpers (in CMS.Helpers.dll) Version: 13.0.131
Syntax 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:
StringUsage 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 Exception | Condition |
---|
ArgumentNullException | document is null. |
Remarks
Ensures indentation and line breaking after each element.
See Also