XmlProcessingInstruction::Target Property
.NET Framework (current version)
Gets the target of the processing instruction.
Assembly: System.Xml (in System.Xml.dll)
The following example creates a processing instruction node and adds it to a document.
#using <System.Xml.dll> using namespace System; using namespace System::IO; using namespace System::Xml; int main() { XmlDocument^ doc = gcnew XmlDocument; // Create a procesing instruction. XmlProcessingInstruction^ newPI; String^ PItext = "type='text/xsl' href='book.xsl'"; newPI = doc->CreateProcessingInstruction( "xml-stylesheet", PItext ); // Display the target and data information. Console::WriteLine( "<?{0} {1}?>", newPI->Target, newPI->Data ); // Add the processing instruction node to the document. doc->AppendChild( newPI ); }
Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Available since 10
.NET Framework
Available since 1.1
Show: