Here you can find the source of dump(Node node)
public static void dump(Node node)
//package com.java2s; /*/*w w w. j ava 2 s . com*/ * XmlUtil.java * * (c) 2009 The Echo Nest * See "license.txt" for terms * * */ import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; public class Main { public static void dump(Node node) { System.out.println("Node: " + node.getNodeName()); NamedNodeMap nnm = node.getAttributes(); if (nnm != null) { for (int i = 0; i < nnm.getLength(); i++) { Node n = nnm.item(i); System.out.println(" " + n.getNodeName() + ":" + n.getNodeValue()); } } } }