XProcessingInstruction.Data Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the string value of this processing instruction.
public:
property System::String ^ Data { System::String ^ get(); void set(System::String ^ value); };
public string Data { get; set; }
member this.Data : string with get, set
Public Property Data As String
Property Value
A String that contains the string value of this processing instruction.
Exceptions
The string value
is null
.
Examples
The following example uses the Data property to retrieve the string value of a processing instruction.
XProcessingInstruction pi =
new XProcessingInstruction("xml-stylesheet", "type='text/xsl' href='hello.xsl'");
Console.WriteLine(pi.Data);
pi.Data = "type='text/xsl' href='xform.xsl'";
Console.WriteLine(pi.Data);
Dim pi As XProcessingInstruction = <?xml-stylesheet type='text/xsl' href='hello.xsl'?>
Console.WriteLine(pi.Data)
pi.Data = "type='text/xsl' href='xform.xsl'"
Console.WriteLine(pi.Data)
This example produces the following output:
type='text/xsl' href='hello.xsl'
type='text/xsl' href='xform.xsl'
Remarks
You can use this property to modify an XML tree. This property will cause events to occur.
Applies to
See also
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin