class XmlSettingsReader {

    public boolean getBooleanProperty(String xPathExp, String tagName, boolean defaultVal) {
        return getElementByXPath(xPathExp, tagName, node -> {
            try {
                return Boolean.parseBoolean(node.getTextContent());
            } catch (NumberFormatException e) {
                return defaultVal;
            }
        }, defaultVal);
    }

    public  XmlSettingsReader(String xmlString);

}