TX Text Control .NET for WPF

XmlErrorEventArgs Class

Class
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.dll
Install
dotnet add package TXTextControl.TextControl.WPF.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.dll from the setup.
Inherits
  1. EventArgs
  2. XmlErrorEventArgs

Description

The XmlErrorEventArgs class provides data for the TextControl.XmlNotWellFormed and TextControl.XmlInvalid events.

Syntax

public class XmlErrorEventArgs : EventArgs

Examples

The following example uses XmlErrorEventArgs.FilePosition while handling XmlNotWellFormed.

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

Members

Properties

PropertyDescription
FilePositionGets the absolute file position in the XML document where the error occurred. If the property value is zero, there is no information about the file position.
LineNumberGets the line number in the XML document that contains the error. If the property value is zero, there is no information about the line number.
LinePositionGets the character position within the line where the error occurred. If the property value is zero, there is no information about the line position.
ReasonGets the reason for the error.
URLGets the URL of the XML document containing the error. If the property value is an empty string there is no information about the URL.