Code example for Document

Methods: createProcessingInstruction

0
    /** 
     * adds processing instruction node to DOM. 
     */ 
    public void processingInstruction(String target, String data) {
	final Node last = (Node)_nodeStk.peek();
	ProcessingInstruction pi = _document.createProcessingInstruction(
		target, data);
	if (pi != null){
          if (last == _root && _nextSibling != null)
              last.insertBefore(pi, _nextSibling);
          else 
              last.appendChild(pi);
           
          _lastSibling = pi;
        } 
    } 
 
    /** 
     * This class is only used internally so this method should never  
     * be called. 
     */