public static String computeXpath (Node node) {
        String Xpath = localXpath(node);
        if ("" == Xpath) {
            return  Xpath;
        }
        else {
            Node parent = node.getParentNode();
            String moreXpath;
            while (null != parent.getLocalName()) {
                moreXpath = localXpath(parent);
                Xpath = moreXpath + "/" + Xpath;
                parent = parent.getParentNode();
            }
            return  "/" + Xpath;
        }
    }