Here you can find the source of getIntegerAttribute(Element el, String attribute)
public static int getIntegerAttribute(Element el, String attribute)
//package com.java2s; //License from project: Apache License import org.w3c.dom.Element; public class Main { public static int getIntegerAttribute(Element el, String attribute) { String attributeValue = el.getAttribute(attribute); try {//from www . j a v a2 s . c o m return Integer.parseInt(attributeValue); } catch (NumberFormatException e) { return -1; } } }