nsIDOMProcessingInstruction

IID:a6cf907f-15b3-11d2-932e-00805f8add32
Inherits From:nsIDOMNode

Properties

DOMString data

readonly DOMString target

The nsIDOMProcessingInstruction interface represents a "processing instruction", used in XML as a way to keep processor-specific information in the text of the document.

For more information on this interface please see http://www.w3.org/TR/DOM-Level-2-Core/


References

This interface is returned from the following methods:

nsIDOMDocument.createProcessingInstruction

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
October 20, 2004, 10:04 pm surkov at dc dot baikal dot ru
To add processing instruction to document is needed:
1) create processing instruction by createProcessingInstruction() method of document
2) add processing instruction before documentElement

In example, we will add stylesheet(css) to document:
var stylesheet=document.createProcessingInstruction("xml-stylesheet",
"href='chrome://global/skin/' type='text/css'");
document.insertBefore(stylesheet, document.documentElement);

Copyright © 1999 - 2005 XULPlanet.com