Skip to main content

Definition

Assembly: CloudNimble.XmlEssentials.dll Namespace: CloudNimble.Text.Xml.Serialization Inheritance: CloudNimble.Text.Xml.Serialization.XmlMixedContentItem

Syntax

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:
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

.ctor

Initializes a new instance of the XmlMixedText class that has empty text.

Syntax

.ctor

Initializes a new instance of the XmlMixedText class with the specified text.

Syntax

Parameters

.ctor Inherited

Inherited from CloudNimble.Text.Xml.Serialization.XmlMixedContentItem

Syntax

.ctor Inherited

Inherited from object

Syntax

Properties

Text

Gets or sets the text of the run.

Syntax

Property Value

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

Methods

Equals Inherited Virtual

Inherited from object

Syntax

Parameters

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?
  • CloudNimble.Text.Xml.Serialization.XmlMixedContentItem
  • CloudNimble.Text.Xml.Serialization.XmlMixedElement
  • CloudNimble.Text.Xml.Serialization.XmlMixedAttribute
  • CloudNimble.Text.Xml.XmlWhitespaceHandling