code: private static void buildNodeName(Node node, StringBuffer buffer) {
          if (node.getParentNode() == null) {
              return;
          }
  
          buildNodeName(node.getParentNode(), buffer);
  
          if (node.getParentNode() != null
                  && node.getParentNode().getParentNode() != null) {
              buffer.append(".");
          }
  
          buffer.append(node.getLocalName());
      }
docs: Builds the node path expression for a node in the DOM tree.
  @param node in a DOM tree.
  @param buffer string buffer.