code: public static String getAttribute(Element element, String name) {
          String attr;
          
          attr = getAttributeOpt(element, name);
          if (attr == null) {
              throw new DomException("missing attribute '" + name + "' in element '" + element.getTagName() + "'");
          }
          return attr;
      }
docs: --