# XMLNotWellFormed Event

> Occurs when a loaded XML document is not well-formed and loading is aborted; passes file position, line, column, status code, description and URL.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Event
- **Path:** TX Text Control ActiveX > API Reference > TXTextControl > XMLNotWellFormed Event
- **347 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/xmlnotwellformed-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/xmlnotwellformed-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/xmlnotwellformed-event/llms-full.txt

---

Occurs when a loaded XML document is not well-formed. Loading the document has been aborted and the document's contents are not displayed.

### Syntax

```vbscript
XMLNotWellFormed(FilePos, LineNumber, LinePos, Scode, Description, URL, CancelDisplay)
```

### Parameters

| Parameter | Description |
|---|---|
| FilePos | Is the absolute file position in the XML document where the error occurred. |
| LineNumber | Is the line number in the XML document that contains the error. |
| LinePos | Is the character position within the line where the error occurred. |
| Scode | Is the OLE Status Code. |
| Description | Explains the reason for the error. This string can be changed. |
| URL | Is the URL of the XML document containing the error. If this parameter is an empty string there is no information about the URL. |
| CancelDisplay | Can be set to True if the application wants to display its own error string. When this parameter is not set to True, the control will display a message box showing an error string. |

### Data Types

| Name | Data type |
|---|---|
| FilePos | Long |
| LineNumber | Long |
| LinePos | Long |
| Scode | Long |
| Description | String |
| URL | String |
| CancelDisplay | Boolean |

### See Also

- [Working with XML Files](https://docs.textcontrol.com/tx-text-control-activex/document-editor/xml/llms-full.txt)
- [Programming Category: XML Programming](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/xml/llms-full.txt)

---

## Nearby

- **Previous:** [XMLInvalid Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/xmlinvalid-event/llms-full.txt)
- **Next:** [Zoom Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/zoom-method/llms-full.txt)
