private long longAttribute(String attributeName, Element tag) {
        String value = tag.getAttribute(attributeName);
        if (value.isEmpty()) return 0;
        try {
            return Long.parseLong(value);
        }
        catch (NumberFormatException e) {
            throw new IllegalArgumentException("Expected an integer for attribute '" + attributeName +
                                               "' but got '" + value + "'");
        }
    }
Returns the given attribute as an integer, or 0 if it is not present
config-model-api/src/main/java/com/yahoo/config/application/api/xml/DeploymentSpecXmlReader.java