code: public static Boolean getYesNoAttrVal(final NamedNodeMap nnm, final String name)
        throws SAXException {
      String val = getAttrVal(nnm, name);
  
      if (val == null) {
        return null;
      }
  
      if ((!"yes".equals(val)) && (!"no".equals(val))) {
        throw new SAXException("Invalid attribute value: " + val);
      }
  
      return new Boolean("yes".equals(val));
    }
docs: The attribute value of the named attribute in the given map must be
  absent or "yes" or "no".
  
  @param nnm         NamedNodeMap
  @param name        String name of desired attribute
  @return Boolean    attribute value or null
  @throws SAXException