Java examples for XML:XML Attribute
get Name Attribute from XML Element
//package com.java2s; import org.w3c.dom.Element; public class Main { public static final String NAME_ATTR = "name"; public static String getNameAttr(Element element) { return element.getAttribute(NAME_ATTR); }/* ww w. j av a2 s. c om*/ }