stack.push(parent);
parent = parent.getParent();
} while (parent != null);
// Remove the fake parent node if there is one.
Node top = (Node) stack.peek();
if (top instanceof Element && ((Element) top).getName() == null) {
stack.pop();
}
StringBuffer path = new StringBuffer();