> ## Documentation Index
> Fetch the complete documentation index at: https://easyaf.nimbleapps.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# XmlMixedText

> Represents a run of text in mixed content. This class cannot be inherited.

## Definition

**Assembly:** CloudNimble.XmlEssentials.dll

**Namespace:** CloudNimble.Text.Xml.Serialization

**Inheritance:** CloudNimble.Text.Xml.Serialization.XmlMixedContentItem

## Syntax

```csharp theme={"dark"}
CloudNimble.Text.Xml.Serialization.XmlMixedText
```

## Summary

Represents a run of text in mixed content. This class cannot be inherited.

## Usage

An `XmlMixedText` is a run of text inside mixed content. Its `Text` property holds the characters after entity and character references have been resolved, so `&lt;` in the document is `<` in the property.

The serializer creates one item for each run of text between child elements. To add text yourself, create an item and add it to the list:

```csharp theme={"dark"}
paragraph.Content.Add(new XmlMixedText(" "));
```

When the list is written, the text is escaped as needed. See `XmlMixedContentItem` for an example that reads text runs.

## Considerations

* White space inside a run is kept exactly, including the spaces next to a child element. A run that is only white space is dropped when reading unless `XmlSerializerOptions.WhitespaceHandling` is `XmlWhitespaceHandling.Significant`.
* A CDATA section is read as an `XmlMixedText`. It is written back as escaped text, not as CDATA.
* `Text` is never `null` on an item the serializer creates, and its default is the empty string.

## Constructors

### &#x20;.ctor

Initializes a new instance of the [XmlMixedText](https://easyaf.nimbleapps.cloud/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlMixedText.md) class that has empty text.

#### Syntax

```csharp theme={"dark"}
public XmlMixedText()
```

### &#x20;.ctor

Initializes a new instance of the [XmlMixedText](https://easyaf.nimbleapps.cloud/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlMixedText.md) class with the specified text.

#### Syntax

```csharp theme={"dark"}
public XmlMixedText(string text)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `text` | `string` | The text of the run. |

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `CloudNimble.Text.Xml.Serialization.XmlMixedContentItem`

#### Syntax

```csharp theme={"dark"}
protected XmlMixedContentItem()
```

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public Object()
```

## Properties

### &#x20;Text

Gets or sets the text of the run.

#### Syntax

```csharp theme={"dark"}
public string Text { get; set; }
```

#### Property Value

Type: `string`
The text of the run. The default is an empty string.

## Methods

### &#x20;Equals Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual bool Equals(object obj)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `obj` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;Equals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public static bool Equals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;GetHashCode Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### &#x20;GetType Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public System.Type GetType()
```

#### Returns

Type: `System.Type`

### &#x20;MemberwiseClone Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
protected internal object MemberwiseClone()
```

#### Returns

Type: `object`

### &#x20;ReferenceEquals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public static bool ReferenceEquals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;ToString Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual string ToString()
```

#### Returns

Type: `string?`

## Related APIs

* CloudNimble.Text.Xml.Serialization.XmlMixedContentItem
* CloudNimble.Text.Xml.Serialization.XmlMixedElement
* CloudNimble.Text.Xml.Serialization.XmlMixedAttribute
* CloudNimble.Text.Xml.XmlWhitespaceHandling


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.