Here you can find the source of getAttribute(Element e, String name)
public static String getAttribute(Element e, String name)
//package com.java2s; //License from project: LGPL import org.w3c.dom.Element; public class Main { public static String getAttribute(Element e, String name) { return e.hasAttribute(name) ? e.getAttribute(name) : ""; }/*from ww w . j a va 2s . c o m*/ }