Struct ForXmlClause
The trailing FOR XML clause of a statement (SQL Server): the output mode plus the optional
row element name (RAW('name')/PATH('name')), ROOT('name') wrapper and
ELEMENTS flag.
public readonly record struct ForXmlClause : IEquatable<ForXmlClause>
- Implements
- Inherited Members
- Extension Methods
Constructors
ForXmlClause(ForXmlMode, string?, string?, bool)
The trailing FOR XML clause of a statement (SQL Server): the output mode plus the optional
row element name (RAW('name')/PATH('name')), ROOT('name') wrapper and
ELEMENTS flag.
public ForXmlClause(ForXmlMode Mode, string? ElementName = null, string? Root = null, bool Elements = false)
Parameters
ModeForXmlModeWhich
FOR XMLshape is emitted.ElementNamestringThe row element name for
RAW/PATH, ornull.RootstringAn optional
ROOT('name')wrapper around the document.ElementsboolWhether column values become child elements (
ELEMENTS) instead of attributes.
Properties
ElementName
The row element name for RAW/PATH, or null.
public string? ElementName { get; init; }
Property Value
Elements
Whether column values become child elements (ELEMENTS) instead of attributes.
public bool Elements { get; init; }
Property Value
Mode
Which FOR XML shape is emitted.
public ForXmlMode Mode { get; init; }
Property Value
Root
An optional ROOT('name') wrapper around the document.
public string? Root { get; init; }