Here you can find the source of getAttribute(Node node, String name)
static public Node getAttribute(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 Node getAttribute(Node node, String name) { NamedNodeMap attributes = node.getAttributes(); return attributes.getNamedItem(name); }/*from w w w . j a va2s . c om*/ }