# XMLElements Collection Object

> XMLElements collection object with all XML elements of a tag name, from TXTextControl.XMLElements: Add, Item, Remove, InputItem, Count and InputItemIndex.

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

---

An XMLElements collection object is an OLE Automation object whose members represent all XML elements with a certain tag name. The members of an XMLElements collection object are OLE Automation objects of the class [XMLElement](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelement/llms-full.txt). An XMLElements collection object can be obtained with the [TXTextControl.XMLElements](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/xmlelements-property/llms-full.txt) property.

### Syntax

```vbscript
XMLElements
```

### Members

#### Properties

| Property | Description |
|---|---|
| [Count](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/count-property/llms-full.txt) | Returns the number of [XMLElement](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelement/llms-full.txt) objects in the collection. |
| [InputItemIndex](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/inputitemindex-property/llms-full.txt) | Returns the index of the element with the current input position in the collection. |

#### Methods

| Method | Description |
|---|---|
| [Add](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/add-method/llms-full.txt) | Adds a new [XMLElement](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelement/llms-full.txt) object to the collection. |
| [InputItem](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/inputitem-method/llms-full.txt) | Returns the XML element of an [XMLElements](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/llms-full.txt) collection which contains the current input position. |
| [Item](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/item-method/llms-full.txt) | Returns a specific XML element of an [XMLElements](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/llms-full.txt) collection. |
| [Remove](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/remove-method/llms-full.txt) | Removes an XML element from an [XMLElements](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/llms-full.txt) collection. |

### 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)

---

## In This Section

- [Add Method](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/add-method/llms-full.txt): 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.
- [Count Property](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/count-property/llms-full.txt): Returns the number of XMLElement objects in an XMLElements collection, all XML elements with a certain tag name, as a Long. Read only and run time only.
- [InputItem Method](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/inputitem-method/llms-full.txt): Returns the XMLElement of an XMLElements collection that contains the current input position, or no object if the input position is in none of them.
- [InputItemIndex Property](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/inputitemindex-property/llms-full.txt): Returns the index of the XML element with the current input position in an XMLElements collection as a Long, or zero if the position is in no element.
- [Item Method](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/item-method/llms-full.txt): Returns the XML element at a position from 1 to Count of an XMLElements collection; Item is the default method, with a Basic example of three equal forms.
- [Remove Method](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/remove-method/llms-full.txt): Removes the XML element at an index from 1 to Count from an XMLElements collection; returns 0 on error, 1 if the DTD makes it invalid, 2 on success.

---

## Nearby

- **Previous:** [Text Property](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelement/text-property/llms-full.txt)
- **Next:** [Add Method](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/add-method/llms-full.txt)
