Definition
Assembly: CloudNimble.XmlEssentials.dll Namespace: CloudNimble.Text.Xml.Serialization Inheritance: System.AttributeSyntax
Summary
Specifies that a member holds the mixed content of the element for its containing type: text interleaved with child elements. This class cannot be inherited.Usage
Put[XmlMixed] on a List<XmlMixedContentItem> member to map an element whose content is text with child elements inside it. The serializer fills the list with XmlMixedText and XmlMixedElement items in document order, and writes them back in the order of the list.
<Paragraph>Press <Key>Ctrl</Key> and <Key>S</Key> to save.</Paragraph> into this type gives five items: the text Press , a Key element, the text and, a second Key element, and the text to save.
See Mixed content and overflow for the complete example, and the mixed content sample.
Remarks
The member is a collection of XmlMixedContentItem. A type can have one member with this attribute, and that type cannot also map members to child elements or to text content.Considerations
- A type can have one
[XmlMixed]member. It can also have members mapped to attributes. It can’t have members mapped to child elements, or an[XmlText]or[XmlCData]member. The serializer throwsNotSupportedExceptionfor those combinations when it builds the type’s metadata. - Every child element goes into the list as an
XmlMixedElement. Child elements aren’t deserialized into typed objects. - Text that is only white space between two elements is dropped unless
XmlSerializerOptions.WhitespaceHandlingisXmlWhitespaceHandling.Significant. - A CDATA section is read as text and written back as escaped text. Comments and processing instructions are not kept.
- Each element is held as a mutable
XmlElementNode, which allocates a node for the element and for each of its descendants. For large documents that are mostly mixed content, consider reading withUtf8XmlReaderorXmlDocumentinstead.
Constructors
.ctor
Syntax
.ctor Inherited
Inherited from
System.AttributeSyntax
.ctor Inherited
Inherited from
objectSyntax
Properties
TypeId Inherited Virtual
Inherited from
System.AttributeSyntax
Property Value
Type:object
Methods
Equals Override
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:bool
Equals Inherited Virtual
Inherited from
objectSyntax
Parameters
Returns
Type:bool
Equals Inherited
Inherited from
objectSyntax
Parameters
Returns
Type:bool
GetCustomAttribute Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute?
GetCustomAttribute Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute?
GetCustomAttribute Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute?
GetCustomAttribute Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute?
GetCustomAttribute Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute?
GetCustomAttribute Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute?
GetCustomAttribute Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute?
GetCustomAttribute Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute?
GetCustomAttributes Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute[]
GetCustomAttributes Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute[]
GetCustomAttributes Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute[]
GetCustomAttributes Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute[]
GetCustomAttributes Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute[]
GetCustomAttributes Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute[]
GetCustomAttributes Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute[]
GetCustomAttributes Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute[]
GetCustomAttributes Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute[]
GetCustomAttributes Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute[]
GetCustomAttributes Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute[]
GetCustomAttributes Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute[]
GetCustomAttributes Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute[]
GetCustomAttributes Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute[]
GetCustomAttributes Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute[]
GetCustomAttributes Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:System.Attribute[]
GetHashCode Override
Inherited from
System.AttributeSyntax
Returns
Type:int
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
IsDefaultAttribute Inherited Virtual
Inherited from
System.AttributeSyntax
Returns
Type:bool
IsDefined Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:bool
IsDefined Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:bool
IsDefined Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:bool
IsDefined Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:bool
IsDefined Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:bool
IsDefined Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:bool
IsDefined Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:bool
IsDefined Inherited
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:bool
Match Inherited Virtual
Inherited from
System.AttributeSyntax
Parameters
Returns
Type:bool
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
Returns
Type:bool
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?
Related APIs
- CloudNimble.Text.Xml.Serialization.XmlMixedContentItem
- CloudNimble.Text.Xml.Serialization.XmlMixedText
- CloudNimble.Text.Xml.Serialization.XmlMixedElement
- CloudNimble.Text.Xml.Serialization.XmlTextAttribute
- CloudNimble.Text.Xml.Serialization.XmlCDataAttribute
- CloudNimble.Text.Xml.Nodes.XmlElementNode