private Node<String> traverseDom(TreeWalker walker, int[] nodePosition) {
        Node<String> rootNode = new Node<String>(nodePosition[0]);
        org.w3c.dom.Node currentNode = walker.getCurrentNode();
        rootNode.setLabel(currentNode.getNodeName());
        rootNode.setData(getNodeValue(currentNode));

        for (org.w3c.dom.Node n = walker.firstChild(); n != null; n = walker
                .nextSibling()) {
            if (n.getNodeName().equalsIgnoreCase("script")
                    || n.getNodeName().equalsIgnoreCase("noscript")
                    || n.getNodeName().equalsIgnoreCase("style")
                    || n.getNodeName().equalsIgnoreCase("head")
                    || n.getNodeName().equalsIgnoreCase("br")
                    || n.getNodeName().equalsIgnoreCase("input")
                    || n.getNodeName().equalsIgnoreCase("hr")) {
                continue;
            }
            
            nodePosition[0] += 1;
            rootNode.addChild(traverseDom(walker, nodePosition));
        }
        walker.setCurrentNode(currentNode);
        return rootNode;
    }