Here you can find the source of getNodeAttributeValue(Node element, String attributeName)
Parameter | Description |
---|---|
element | org.w3c.dom.Node |
attributeName | java.lang.String |
public static String getNodeAttributeValue(Node element, String attributeName)
//package com.java2s; //License from project: Apache License import org.w3c.dom.Node; public class Main { /**/*from w w w. j a v a 2 s . c o m*/ * Insert the method's description here. * * @return java.lang.String * @param element * org.w3c.dom.Node * @param attributeName * java.lang.String */ public static String getNodeAttributeValue(Node element, String attributeName) { Node tmpNode = element.getAttributes().getNamedItem(attributeName); String tmp = null; if (tmpNode != null) tmp = tmpNode.getNodeValue(); return tmp; } }