Android examples for XML:XML Attribute
get Attribute from XML Element by name
//package com.java2s; import org.w3c.dom.Element; public class Main { public static String getAttribute(Element e, String name) { if (e.getAttribute(name) == null) return ""; return e.getAttribute(name); }/*from ww w. j a v a 2s .c o m*/ }