# RemoveChild Method

> Removes a sub-element by name and optional Index from an XMLElement; returns 0 on error, 1 if the DTD makes the document invalid, 2 on success.

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

---

## On This Page

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

---

## Nearby

- **Previous:** [ElementName Property](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelement/elementname-property/llms.txt)
- **Next:** [Select Method](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelement/select-method/llms.txt)
