Here you can find the source of getVectorPathFromNode(Node node)
private static Vector getVectorPathFromNode(Node node)
//package com.java2s; import java.util.Vector; import org.w3c.dom.*; public class Main { private static Vector getVectorPathFromNode(Node node) { Vector path = new Vector(); while (node != null) { path.insertElementAt(node, 0); node = node.getParentNode(); }/* w ww . j a v a 2 s . c o m*/ return path; } }