Java XML Node Path getNodePath(Node node)

Here you can find the source of getNodePath(Node node)

Description

get Node Path

License

Apache License

Declaration

public static String getNodePath(Node node) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import org.w3c.dom.Node;

public class Main {

    public static String getNodePath(Node node) {
        StringBuffer sb = new StringBuffer(32);
        while (node != null) {
            sb.append(node.getNodeName());
            sb.append("/");
            node = node.getParentNode();
        }/*ww  w  . j  a va  2  s .co m*/
        return sb.toString();
    }
}

Related

  1. getIndividualPath(Node individual)
  2. getMatchingNodes(Node node, String[] nodePath, int cur, List res)
  3. getNode(Node node, String... nodePath)
  4. getNode(Node root, String nodePath)
  5. getNodeCompletePath(Node node)
  6. getNodePath(Node node)
  7. getNodePath(Node node)
  8. getNodePath(Node node, String postfix)
  9. getNodes(Node node, String path)