Code example for Node

Methods: getParentNode

0
		current = elem;
	} 
 
	@Override 
	public void endElement(String uri, String name, String qName) {
		current = current.getParentNode();
	} 
 
	@Override 
	public void characters(char[] ch, int start, int length) {
		String str = new String(ch, start, length);
		if(length > 0) {
			Text text = doc.createTextNode(str);
			current.appendChild(text);
		} 
	} 
 
	@Override 
	public void processingInstruction(String target, String data) {
		ProcessingInstruction pi = doc
				.createProcessingInstruction(target, data);