code: protected String elementAsString(XMLStreamReader reader, String key, Map<String, String> expressions)
        throws XMLStreamException
     {
        String elementtext = rawElementText(reader);
  
        if (key != null && expressions != null && elementtext != null && elementtext.indexOf("${") != -1)
           expressions.put(key, elementtext);
        
        return getSubstitutionValue(elementtext);
     }
docs: convert an xml element in String value
  
  @param reader the StAX reader
  @param key The key
  @param expressions The expressions
  @return the string representing element
  @throws XMLStreamException StAX exception