Code example for Node

Methods: appendChild

	public void characters(char[] ch, int start, int length) {
		String str = new String(ch, start, length);
		if(length > 0) {
			Text text = doc.createTextNode(str);
	public void processingInstruction(String target, String data) {
		ProcessingInstruction pi = doc
				.createProcessingInstruction(target, data);
	public static void generateDOM(String xml, Document doc) throws SAXException {
		SAXParserFactory fact = SAXParserFactory.newInstance();
		try { 
			SAXParser parser = fact.newSAXParser();
Connect your IDE to all the code out there  Get Codota for Java