Here you can find the source of getAttribIntHex(Element ele, String name)
public static int getAttribIntHex(Element ele, String name)
//package com.java2s; import org.w3c.dom.*; public class Main { /**/*from w w w . j ava 2s. co m*/ * Parses the given attribute of this tag as a hexadecimal encoded string and * returns it as an int */ public static int getAttribIntHex(Element ele, String name) { String sval = ele.getAttribute(name); int val = 0; try { val = Integer.parseInt(sval, 16); } catch (Exception e) { } return val; } public static int parseInt(String val) { if (val == null) return 0; int retVal = 0; try { retVal = Integer.parseInt(val); } catch (Exception e) { } return retVal; } }