code: static boolean isElementParentName(Element element, String name) {
          Element parent = element.getParentElement();
          if (parent == null) {
              return false;
          }
          return isElementName(parent, name);
      }
docs: Returns true if an elements parents name is same as argument