SPFieldLink.SchemaXml property
取得結構描述中Collaborative Application Markup Language (CAML)定義欄位參照。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public ReadOnly Property SchemaXml As String
Get
'用途
Dim instance As SPFieldLink
Dim value As String
value = instance.SchemaXml
public string SchemaXml { get; }
Property value
Type: System.String
包含CAML定義欄位參照的字串。
備註
屬性所傳回的值是類似下列的Item內容類型中的標題欄位參照傳回之後的字串的字串。
<FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}"
Name="Title"
Required="TRUE"
ShowInNewForm="TRUE"
ShowInEditForm="TRUE" />
相較之下,相同的內容類型中的對應SPField物件的SchemaXml屬性會傳回下列字串。
<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).
請參閱
參照
Microsoft.SharePoint namespace