Programmer's Guide > Interfaces > W3C Document interface > createProcessingInstruction method
  
createProcessingInstruction method
Creates a ProcessingInstruction node given the specified name and data strings.
createProcessingInstruction(target, data)
Parameters
Stringtarget
The target part of the processing instruction.
Stringdata
The data for the node.
Returns
ProcessingInstruction. The new ProcessingInstruction object.
Throws
DOMException
INVALID_CHARACTER_ERR: Raised if the specified target contains an illegal character.
NOT_SUPPORTED_ERR: Raised if this document is an HTML document.