NewLineHandling Enumeration


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Specifies how to handle line breaks.

Namespace:   System.Xml
Assembly:  System.Xml (in System.Xml.dll)

public enum NewLineHandling

Member nameDescription

New line characters are entitized. This setting preserves all characters when the output is read by a normalizing XmlReader.


The new line characters are unchanged. The output is the same as the input.


New line characters are replaced to match the character specified in the NewLineChars property.

This enumeration is passed to the Create method to specify whether the XmlWriter object will normalize line breaks in the output.

See the NewLineHandling property to see a table detailing the behavior of each of the validation types.

Universal Windows Platform
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top