Here you can find the source of getAttributeValue(Node node, String name)
static public String getAttributeValue(Node node, String name)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; public class Main { static public String getAttributeValue(Node node, String name) { Node attribute = getAttribute(node, name); if (attribute != null) { return attribute.getNodeValue(); }/*from w w w . ja v a 2 s. co m*/ return null; } static public Node getAttribute(Node node, String name) { NamedNodeMap attributes = node.getAttributes(); return attributes.getNamedItem(name); } }