public static String getParameter(String name) { String xpath = "/webapp-configs/param[@name='" + name + "']/@value"; Node node = instance.configDocument.selectSingleNode(xpath); if (node == null) { instance.logger.error("配置参数[" + name + "]不存在"); return ""; } return node.getText(); }原文链接:https://www.f2er.com/xml/297757.html