Here you can find the source of getAttributName(Node node)
public static Object getAttributName(Node node)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.Node; public class Main { public static String VALUE = "rng:value"; public static String ATTRIBUT_NAME_ATTRIBUT = "name"; public static Object getAttributName(Node node) { return node.getAttributes().getNamedItem(ATTRIBUT_NAME_ATTRIBUT) .getNodeValue();/*from ww w . j a v a2s .c o m*/ } public static Node getNodeValue(Node node) { for (int i = 0; i < node.getChildNodes().getLength(); i++) { Node n = node.getChildNodes().item(i); if (n.getNodeName().equals(VALUE)) { return n; } } return null; } }