Here you can find the source of getAttributeNode(Node sNode, String attribName)
public static Node getAttributeNode(Node sNode, String attribName)
//package com.java2s; import org.w3c.dom.*; public class Main { public static Node getAttributeNode(Node sNode, String attribName) { NamedNodeMap attrs = sNode.getAttributes(); if (attrs != null) { return attrs.getNamedItem(attribName); }/* w w w .j a v a 2s .c o m*/ return null; } }