Here you can find the source of attributeString(Node node, String attributeName)
public static String attributeString(Node node, String attributeName)
//package com.java2s; import org.w3c.dom.Node; public class Main { public static String attributeString(Node node, String attributeName) { if (node.hasAttributes()) { Node attr = node.getAttributes().getNamedItem(attributeName); if (attr != null) { return attr.getNodeValue(); }//from w ww . ja v a 2 s . com } return null; } }