Here you can find the source of getAttribute(NamedNodeMap namedNodeMap, String name)
public static String getAttribute(NamedNodeMap namedNodeMap, String name)
//package com.java2s; //License from project: Apache License import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; public class Main { public static String getAttribute(NamedNodeMap namedNodeMap, String name) { Node node = namedNodeMap.getNamedItem(name); if (node == null) { return null; }//from www . ja v a2s.c o m return node.getNodeValue(); } }