Here you can find the source of getPath(Node node)
public static String getPath(Node node)
//package com.java2s; import org.w3c.dom.*; public class Main { public static String getPath(Node node) { NamedNodeMap nodeMap = node.getAttributes(); Node pathNode = nodeMap.getNamedItem("path"); if (pathNode != null) { return pathNode.getNodeValue(); } else//from ww w . java 2s .c o m return null; } }