SPFieldLink.SchemaXml Property
Gets the schema in Collaborative Application Markup Language (CAML) that defines the field reference.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public ReadOnly Property SchemaXml As String
Get
'Usage
Dim instance As SPFieldLink
Dim value As String
value = instance.SchemaXml
public string SchemaXml { get; }
Property Value
Type: System.String
A string that contains CAML that defines the field reference.
Remarks
The value that is returned by the property is a string similar to the following string that has been returned for the Title field reference in the Item content type.
<FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}"
Name="Title"
Required="TRUE"
ShowInNewForm="TRUE"
ShowInEditForm="TRUE" />
In contrast, the SchemaXml property for the corresponding SPField object in the same content type returns the following string.
<Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}"
Name="Title"
SourceID="https://schemas.microsoft.com/sharepoint/v3"
StaticName="Title"
Group="_Hidden"
Type="Text"
DisplayName="Title"
Required="TRUE"
FromBaseType="TRUE"
Customization=""
ShowInNewForm="TRUE"
ShowInEditForm="TRUE">
</Field>
For more information, see FieldRef Element (ContentType).
See Also
Reference
Microsoft.SharePoint Namespace