# TextControl.XmlEditMode Property

> Gets or sets a value specifying whether Text Control operates in an edit mode that validates the XML document according to the document's DTD.

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

---

### Description

Gets or sets a value specifying whether Text Control operates in an edit mode that validates the XML document according to the document's DTD.

### Syntax

```csharp
public XmlEditMode XmlEditMode { get; set; }
```

```vbnet
Public Property XmlEditMode As XmlEditMode
```

### Members

| Value | Description |
|---|---|
| Validate | Every operation that manipulates an XML document is validated according to the document's DTD. This mode is read only and is automatically switched on after loading a valid XML document. |
| NoValidate | Text Control operates in its normal editor mode. No validation of an XML document occurs. Because the document can be invalid after every operation the document cannot be saved in XML format. |

### Examples

The following example uses `TextControl.XmlEditMode` to configure xml edit mode as part of the text control workflow. The change is then applied to the active document or user interface.

```csharp
textControl.XmlEditMode = XmlEditMode.Validate;
textControl.Update();
```

```vbnet
textControl.XmlEditMode = XmlEditMode.Validate
textControl.Update()
```

---

## Nearby

- **Previous:** [TextControl.VShrunk Event](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/vshrunk-event/llms-full.txt)
- **Next:** [TextControl.XmlInvalid Event](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/xmlinvalid-event/llms-full.txt)
