UtilXmlXmlBeautifier(String, String, Boolean, Encoding) Method

Beautifies the contents of an Xml document.

Definition

Namespace: DevCase.Core.DataProcessing.Xml
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static string XmlBeautifier(
	string xmlText,
	string indentChars = "",
	bool indentOnAttributes = false,
	Encoding enc = null
)

Parameters

xmlText  String
The Xml text content. It can be an entire document or a fragment.
indentChars  String  (Optional)
The string that is used to indent the Xml.

Default value is Tab

indentOnAttributes  Boolean  (Optional)
If set to , attributes will be separated by newlines.
enc  Encoding  (Optional)
The Xml text encoding to use.

Default value is Default.

Return Value

String
The beautified Xml text.

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

Exceptions

ArgumentNullException xmlText

See Also