code: protected Boolean elementAsBoolean(XMLStreamReader reader, String key, Map<String, String> expressions)
        throws XMLStreamException, ParserException
     {
        String elementtext = rawElementText(reader);
  
        if (key != null && expressions != null && elementtext != null && elementtext.indexOf("${") != -1)
           expressions.put(key, elementtext);
        
        String stringValue = getSubstitutionValue(elementtext);
        if (StringUtils.isEmpty(stringValue) || stringValue.trim().equalsIgnoreCase("true") ||
            stringValue.trim().equalsIgnoreCase("false"))
        {
           return StringUtils.isEmpty(stringValue) ? Boolean.TRUE : Boolean.valueOf(stringValue.trim());
        }
        else
        {
           throw new ParserException(bundle.elementAsBoolean(elementtext, reader.getLocalName()));
        }
     }
docs: convert an xml element in boolean value. Empty elements results with true (tag presence is sufficient condition)
  
  @param reader the StAX reader
  @param key The key
  @param expressions The expressions
  @return the boolean representing element
  @throws XMLStreamException StAX exception
  @throws ParserException in case of non valid boolean for given element value