# XMLElement Object

> XMLElement OLE Automation object for an element of an XML document, created with CreateObject: ElementName, Text, AddChild, ChildItem, RemoveChild and Select.

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

---

## On This Page

- [Syntax](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelement/#syntax)
- [Members](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelement/#members)
- [See Also](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelement/#see-also)

---

## In This Section

- [AddChild Method](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelement/addchild-method/llms.txt): Adds an XMLElement as a sub-element at the position the DTD gives, optionally before or after a child; returns 0 on error, 1 if invalid, 2 on success.
- [AutoSelect Property](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelement/autoselect-property/llms.txt): Determines whether the text of a newly added XML element is selected automatically; the Boolean AutoSelect property is True by default. Run time only.
- [AutoText Property](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelement/autotext-property/llms.txt): Determines whether a new XML element without text gets its name in square brackets as text; the Boolean AutoText property is True by default. Run time only.
- [ChildItem Method](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelement/childitem-method/llms.txt): Returns the child XMLElement with the given element name, with an optional Index for elements with several sub-elements of that name, and a Basic example.
- [ElementName Property](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelement/elementname-property/llms.txt): Returns or sets the name of an XMLElement as a String; the name can only be changed for newly created elements, not for elements of an XML document.
- [RemoveChild Method](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelement/removechild-method/llms.txt): 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.
- [Select Method](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelement/select-method/llms.txt): Selects the text of an XML element that belongs to the document; for an element with several sub-elements, the text of the first sub-element is selected.
- [Text Property](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelement/text-property/llms.txt): Returns or sets the text of an XML element, the default property of XMLElement; the text parts of several sub-elements are separated with linefeeds, Chr(10).

---

## Nearby

- **Previous:** [Item Method](https://docs.textcontrol.com/tx-text-control-activex/reference/styles/item-method/llms.txt)
- **Next:** [AddChild Method](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelement/addchild-method/llms.txt)
