# XmlErrorEventArgs.FilePosition Property

> 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.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > XmlErrorEventArgs.FilePosition Property
- **329 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/xmlerroreventargs/fileposition-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/xmlerroreventargs/fileposition-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/xmlerroreventargs/fileposition-property/llms-full.txt

---

### Description

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.

### Syntax

```csharp
public int FilePosition { get; }
```

```vbnet
Public ReadOnly Property FilePosition As Integer
```

### Examples

The following example uses `XmlErrorEventArgs.FilePosition` while handling `XmlNotWellFormed`.

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

```vbnet
AddHandler textControl.XmlNotWellFormed,
    Sub(sender, e)
        Console.WriteLine($"File Position: {e.FilePosition}")
    End Sub
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [XmlErrorEventArgs Class](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/xmlerroreventargs/llms-full.txt)
- **Next:** [XmlErrorEventArgs.LineNumber Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/xmlerroreventargs/linenumber-property/llms-full.txt)
