Creates an XmlProcessingInstruction with the specified name and data. : XmlProcessingInstruction « XML « VB.Net






Creates an XmlProcessingInstruction with the specified name and data.

 

Imports System
Imports System.IO
Imports System.Xml

public class Sample

  public shared sub Main()

    Dim doc as XmlDocument = new XmlDocument()

    Dim newPI as XmlProcessingInstruction 
    Dim PItext as String = "type='text/xsl' href='book.xsl'"
    newPI = doc.CreateProcessingInstruction("xml-stylesheet", PItext)

    Console.WriteLine("<?{0} {1}?>", newPI.Target, newPI.Data)

    doc.AppendChild(newPI)
  end sub
end class

   
  








Related examples in the same category