# Add Method

> Adds an XMLElement to an XMLElements collection, optionally before or after a member; returns 0 on error, 1 if the DTD makes it invalid, 2 on success.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Method
- **Path:** TX Text Control ActiveX > API Reference > XMLElements > Add Method
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/add-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/add-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/add-method/llms-full.txt

---

## On This Page

- [Syntax](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/add-method/#syntax)
- [Parameters](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/add-method/#parameters)
- [Return Value](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/add-method/#return-value)
- [Data Types](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/add-method/#data-types)
- [Examples](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/add-method/#examples)
- [See Also](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/add-method/#see-also)

---

## Nearby

- **Previous:** [XMLElements Collection Object](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/llms.txt)
- **Next:** [Count Property](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/count-property/llms.txt)
