Here you can find the source of getAttributeValues(Element el)
public static String[] getAttributeValues(Element el)
//package com.java2s; import org.w3c.dom.*; public class Main { /** Gets a list of all attribute values for the given DOM element. */ public static String[] getAttributeValues(Element el) { NamedNodeMap map = el.getAttributes(); int len = map.getLength(); String[] attrValues = new String[len]; for (int i = 0; i < len; i++) { Attr attr = (Attr) map.item(i); attrValues[i] = attr == null ? null : attr.getValue(); }/* w w w . j a va 2 s . c om*/ return attrValues; } }