Here you can find the source of getAttributeValue(Node node, String attribute)
public static String getAttributeValue(Node node, String attribute)
//package com.java2s; import org.w3c.dom.Node; public class Main { public static String getAttributeValue(Node node, String attribute) { Node att = node.getAttributes().getNamedItem(attribute); if (att == null) return null; return att.getTextContent(); }/*from ww w . j a va 2s .com*/ }