XML DOM createProcessingInstruction() method
Definition and usage
The createProcessingInstruction() method creates a ProcessingInstruction node.
Syntax:
createProcessingInstruction(target,data)
Parameters | Description |
---|---|
target | The target of the processing instruction. |
data | The content text of the processing instruction. |
Return value
a newly created ProcessingInstruction node.
throws
If target If it contains illegal characters, an INVALID_CHARACTER_ERR code will be thrown. DOMException exception.
If it is an HTML document, processing instructions are not supported and a NOT_SUPPORTED_ERR code will be thrown. DOMException exception.