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