public static void domNodeToTree(Node domNode, TreeDomNode parentTreeNode, boolean displayNodeValue) {

	if(domNode instanceof Text) return;
	
	TreeDomNode treeNode = new TreeDomNode(domNode, displayNodeValue);
	
	parentTreeNode.add(treeNode);
	
	NamedNodeMap attributeNodes = domNode.getAttributes();
	
	if((attributeNodes != null) && (attributeNodes.getLength() > 0)) {
	    
	    for(int i = 0; i < attributeNodes.getLength(); i++) {
		treeNode.add(new TreeDomNode(attributeNodes.item(i), displayNodeValue));
	    }
	}
	
	
	NodeList childNodes = domNode.getChildNodes();
	
	if((childNodes != null) && (childNodes.getLength() > 0)) {
	    
	    for(int i = 0; i < childNodes.getLength(); i++)
		domNodeToTree(childNodes.item(i), treeNode, displayNodeValue);
	}
    }