protected String getPairValueFromXML(XPath xpath, String path, Document doc) {
        if (doc == null || xpath == null || path == null) {
            return "";
        }
        try {
            XPathExpression expr = xpath.compile(path);
            Object res = expr.evaluate(doc, XPathConstants.NODESET);
            NodeList nodes = (NodeList) res;
            if (nodes.getLength() < 1) {
                return null;
            }
            String v = "";
            for (int i = 0; i < nodes.getLength(); ++i) {
                Node n = nodes.item(i);
                NamedNodeMap nnm = n.getAttributes();

                Node n1 = nnm.getNamedItem("name");
                Node n2 = nnm.getNamedItem("value");
                if (n1 == null || n2 == null) {
                    continue;
                }

                v += n1.getNodeValue() + "=" + n2.getNodeValue();

                if (i != nodes.getLength() - 1) {
                    v += "&";
                }
            }

            return v;
        } catch (Exception e) {
            return "";
        }
    }