XmlErrorEventArgs Class
- Namespace
TXTextControl
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. Core. SDK
- Assembly
TXTextControl.Core. dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. Core. SDK TXTextControl.from the setup.dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
- Inherits
- Event
Args - Xml
Error Event Args
- Event
Description
The XmlErrorEventArgs class provides data for the TextControl.XmlNotWellFormed and TextControl.XmlInvalid events.
Syntax
public class XmlErrorEventArgs : EventArgsPublic Class XmlErrorEventArgs
Inherits EventArgsExamples
The following example uses XmlErrorEventArgs.FilePosition while handling XmlNotWellFormed.
textControl.XmlNotWellFormed += (_, e) =>
{
Console.WriteLine($"File Position: {e.FilePosition}");
};AddHandler textControl.XmlNotWellFormed,
Sub(sender, e)
Console.WriteLine($"File Position: {e.FilePosition}")
End SubMembers
Properties
| Property | Description |
|---|---|
| FilePosition | Gets 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. |
| LineNumber | Gets 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. |
| LinePosition | Gets the character position within the line where the error occurred. If the property value is zero, there is no information about the line position. |
| Reason | Gets the reason for the error. |
| URL | Gets the URL of the XML document containing the error. If the property value is an empty string there is no information about the URL. |