Here you can find the source of getNodeAttributeValue(Node node, String attributeName)
public static String getNodeAttributeValue(Node node, String attributeName)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; public class Main { public static String getNodeAttributeValue(Node node, String attributeName) { NamedNodeMap attributes = node.getAttributes(); if (attributes == null) return null; Node attributeValue = attributes.getNamedItem(attributeName); return attributeValue == null ? null : attributeValue.getNodeValue(); }//from w w w .j a va 2 s . c om }