Here you can find the source of getXMLInt(Element e, String attrName)
public static int getXMLInt(Element e, String attrName)
//package com.java2s; // modify it under the terms of the GNU General Public License import org.w3c.dom.Element; public class Main { public static int getXMLInt(Element e, String attrName) { try {// w w w .j a v a 2s. c o m return Integer.parseInt(e.getAttribute(attrName)); } catch (Exception exc) { return -1; } } }