Here you can find the source of getAttribute(Node node, String attributeName)
public static String getAttribute(Node node, String attributeName)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.Node; public class Main { public static String getAttribute(Node node, String attributeName) { Node n = node.getAttributes().getNamedItem(attributeName); if (n != null) { return n.getNodeValue(); } else {//from w ww . j a va2s . c o m return null; } } }