# Text Property

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

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

---

Returns or sets the text belonging to an XML element.

### Syntax

```vbscript
XMLElement.Text [= Text]
```

### Data Types

String.

### Examples

The following Basic example sets the text of the second address in an XML document that contains addresses consisting of the sub-elements Name, Street and City. Because the Text property is the default property of the [XMLElement](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelement/llms-full.txt) object the two lines of code are equivalent:

```vbscript
TXTextControl1.XMLElements("Address")(2).Text = "Jack Miller" & Chr(10) _
& "Baker Street" & Chr(10) & "New York"

TXTextControl1.XMLElements("Address")(2) = "Jack Miller" & Chr(10) _
& "Baker Street" & Chr(10) & "New York"
```

### Limitations

Run time only.

### Remarks

If the element consists of several sub-elements, the text parts must be separated through linefeed characters (Chr(10)).

### See Also

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

---

## Nearby

- **Previous:** [Select Method](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelement/select-method/llms-full.txt)
- **Next:** [XMLElements Collection Object](https://docs.textcontrol.com/tx-text-control-activex/reference/xmlelements/llms-full.txt)
