docs: public static boolean setAttribute(Document document, String xPath, String attribute, String value) {
  
          Node node = document.selectSingleNode(xPath);
          Element e = (Element)node;
          @SuppressWarnings("unchecked")
          List<Attribute> attributes = e.attributes();
          for (Attribute a : attributes) {
              if (a.getName().equals(attribute)) {
                  a.setValue(value);
                  return true;
              }
          }
          return false;
      }