* @return the map of attributes.
*/
public static Map<String, String> attributes(nsIDOMNode node) {
Map<String, String> attributes = new HashMap<String, String>();
nsIDOMNamedNodeMap node_map = node.getAttributes();
if (null != node_map) {
for (long l = 0, len = node_map.getLength(); l < len; l++) {
nsIDOMNode attribute = node_map.item(l);
String name = attribute.getNodeName();
String value = attribute.getNodeValue();
attributes.put(name, value);
}
}