TX Text Control .NET for WPF

XmlInvalid Event

Event|Introduced in 16.0
Namespace
TXTextControl.WPF
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.WPF.dll from the private NuGet feed or Text Control Offline Packages

Description

Occurs when a loaded or changed XML document cannot be validated with the document type definition (DTD) referenced in the document. The event handler receives an argument of type XmlErrorEventArgs containing data related to this event.

Syntax

public event XmlErrorEventHandler XmlInvalid;

Examples

The following example records useful context when xml invalid occurs.

textControl.XmlInvalid += (sender, e) =>
{
    Console.WriteLine($"File Position: {e.FilePosition}");
};