Table of Contents

Class XmlExtension

Namespace
Yarhl.Media.Text
Assembly
Yarhl.Media.Text.dll

Extension methods for XML.

public static class XmlExtension
Inheritance
XmlExtension
Inherited Members

Properties

EscapeSpace

Gets the escape space.

public static string EscapeSpace { get; }

Property Value

string

The escape space.

XmlSpacesPerLevel

Gets the default spaces per XML level.

public static int XmlSpacesPerLevel { get; }

Property Value

int

The spaces per XML level.

Methods

GetIndentedValue(XElement)

Gets the concatenated text to this element removing any indentation.

public static string GetIndentedValue(this XElement entry)

Parameters

entry XElement

XML entry to get text.

Returns

string

The value without indentation.

SetIndentedValue(XElement, string, int)

Sets the concatenated text to this element indented for human-readibility.

public static void SetIndentedValue(this XElement entry, string val, int indent)

Parameters

entry XElement

XML entry to set text.

val string

Value to indent and set.

indent int

Indentation level.