Here you can find the source of getAttributeValue(Node node, String name)
public static String getAttributeValue(Node node, String name)
//package com.java2s; import org.w3c.dom.*; public class Main { public static String getAttributeValue(Node node, String name) { Node attr = getAttribute(node, name); return (attr != null) ? attr.getNodeValue() : null; }/*from w w w .j av a2 s .c o m*/ public static String getAttribute(Element element, String name) { Attr attr = element.getAttributeNode(name); return (attr != null) ? attr.getValue() : null; } public static Node getAttribute(Node node, String name) { return node.getAttributes().getNamedItem(name); } }