Code example for Document

Methods: createProcessingInstruction

        public void processingInstruction(String target, String data)
            throws SAXException { 
            try { 
                top.appendChild(doc.createProcessingInstruction(target, data));
            } catch (DOMException e) {
                throw new SAXException(e.getMessage());
         * Adds a new child {@link org.w3c.dom.Element Element} to the current 
         * node. 
         * @param namespaceURI the namespace URI 
         * @param localName the local name 
         * @param qName the qualified (prefixed) name 
Contextual code suggestions in your IDE  Get Codota for Java