DataType.XmlDocumentConstraint DataType.XmlDocumentConstraint DataType.XmlDocumentConstraint Property

Definition

Gets or sets a value that indicates how an XML document is formatted.

public:
 property Microsoft::SqlServer::Management::Smo::XmlDocumentConstraint XmlDocumentConstraint { Microsoft::SqlServer::Management::Smo::XmlDocumentConstraint get(); void set(Microsoft::SqlServer::Management::Smo::XmlDocumentConstraint value); };
public Microsoft.SqlServer.Management.Smo.XmlDocumentConstraint XmlDocumentConstraint { get; set; }
Public Property XmlDocumentConstraint As XmlDocumentConstraint
Property Value

Default -Uses server default setting

Content - Text is an XML fragment

Document - Text is a well formed XML instance

Remarks

Visual Basic

Dim dt As DataType  
dt = New DataType(SqlDataType.Xml, "Test XML Schema")  
dt.XmlDocumentConstraint = XmlDocumentConstraint.Content  

PowerShell

$dt = new-object Microsoft.SqlServer.Management.Smo.DataType([Microsoft.SqlServer.Management.Smo.SqlDataType]::Xml, "Test XML Schema")  
$dt.XmlDocumentConstraint = [Microsoft.SqlServer.Management.Smo.XmlDocumentConstraint]::Content  

Applies to