SPFieldLink.PrimaryPITarget property

Gets or sets the name of the primary processing instruction in an XML document of the specified content type, which is then used to promote and demote the document property.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Property PrimaryPITarget As String
    Get
    Set
'Usage
Dim instance As SPFieldLink
Dim value As String

value = instance.PrimaryPITarget

instance.PrimaryPITarget = value
public string PrimaryPITarget { get; set; }

Property value

Type: System.String
A string that contains the processing instruction name.

Remarks

If you specify a value for this property, you must also specify a value for the PrimaryPIAttribute property.

As with the PITarget and PIAttribute properties, the PrimaryPITarget and PrimaryPIAttribute properties work in unison to identify the location of an attribute in a processing instruction that holds the value of a document property. If the two “primaries” are set, the built-in XML parser looks for the document property first in the location that is specified by the PrimaryPITarget and PrimaryPIAttribute property pairs. If there is a value at that location, the parser uses it and ignores the PITarget and PIAttribute properties. If the first location contains a a null reference (Nothing in Visual Basic) value, the parser falls back to a secondary location that is specified by the PITarget and PIAttribute property pair.

If you specify values for the PrimaryPITarget and PrimaryPIAttribute pair, you must also specify values for the PITarget and PIAttribute pair.

For more information, see Using Content Types to Specify XML Document Properties.

See also

Reference

SPFieldLink class

SPFieldLink members

Microsoft.SharePoint namespace

PrimaryPIAttribute

Other resources

Using Content Types to Specify XML Document Properties

XMl Parser Processing

FieldRef Element (ContentType)

Fields and Field References