次の方法で共有


XProcessingInstruction.Target プロパティ

定義

この処理命令のターゲット アプリケーションを取得または設定します。

public:
 property System::String ^ Target { System::String ^ get(); void set(System::String ^ value); };
public string Target { get; set; }
member this.Target : string with get, set
Public Property Target As String

プロパティ値

この処理命令のターゲット アプリケーション。

例外

文字列 valuenull

ターゲットは XML 名の制約に従っていません。

次の例では、 Target プロパティを使用して、処理命令のターゲット アプリケーションを取得します。

XProcessingInstruction pi =
    new XProcessingInstruction("xml-stylesheet", "type=\"text/xsl\" href=\"hello.xsl\"");
Console.WriteLine(pi.Target);
Dim pi As XProcessingInstruction = _
    <?xml-stylesheet type="text/xsl" href="hello.xsl"?>
Console.WriteLine(pi.Target)

この例を実行すると、次の出力が生成されます。

xml-stylesheet

適用対象

こちらもご覧ください