private int readOptionalNumber(Element element,String attributeName) {
        String attributeValue=element.getAttribute(attributeName);
        try {
            if (attributeValue.isEmpty()) return -1;
            return Integer.parseInt(attributeValue);
        }
        catch (NumberFormatException e) { // Suppress original exception as it conveys no useful information
            throw new IllegalArgumentException("'" + attributeName + "' in " + element + " must be a number, not '" + attributeValue + "'");
        }
    }
Returns the page element corresponding to the given node, never null
container-search/src/main/java/com/yahoo/search/pagetemplates/config/PageTemplateXMLReader.java