Name

ProcessingInstruction

Synopsis

This interface represents an XML processing instruction (or PI) which specifies an arbitrary string of data to a named target processor. The getTarget( ) and getData( ) methods return the target and data portions of a PI, and these values can also be obtained using the getNodeName( ) and getNodeValue( ) methods of the Node interface. You can alter the data portion of a PI with setData( ) or with the setNodeValue( ) method of Node. ProcessingInstruction nodes never have children.

org.w3c.dom.ProcessingInstruction

Figure 21-13. org.w3c.dom.ProcessingInstruction

public interface ProcessingInstruction extends Node {
// Public Instance Methods
     String getData( );  
     String getTarget( );  
     void setData(String data) throws DOMException;  
}

Returned By

Document.createProcessingInstruction( )

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.