code: private String getRequiredAttribute(Element node, String name) {
          String value = node.getAttribute(name);
          
          if (value.isEmpty()) {
              throw new IllegalArgumentException("Missing " + name + " attribute on node: " + node.getTagName());
          }
          
          return value;
      }
docs: Returns the value of the named attribute from a DOM node, throwing an exception if not found.
  
  @param node The DOM node.
  @param name The attribute name.
  @return The attribute value.