Here you can find the source of getAttribute(String name, Element el)
public static String getAttribute(String name, Element el)
//package com.java2s; import org.w3c.dom.*; public class Main { /**//from ww w.jav a2s. com * Gets the value of the given DOM element's attribute * with the specified name. */ public static String getAttribute(String name, Element el) { if (name == null || el == null) return null; if (!el.hasAttribute(name)) return null; return el.getAttribute(name); } }