code: protected Long elementAsLong(XMLStreamReader reader, String key, Map<String, String> expressions)
        throws XMLStreamException, ParserException
     {
        Long longValue = null;
        String elementtext = rawElementText(reader);
  
        if (key != null && expressions != null && elementtext != null && elementtext.indexOf("${") != -1)
           expressions.put(key, elementtext);
        
        try
        {
           longValue = Long.valueOf(getSubstitutionValue(elementtext));
        }
        catch (NumberFormatException nfe)
        {
           throw new ParserException(bundle.notValidNumber(elementtext, reader.getLocalName()));
        }
  
        return longValue;
     }
docs: convert an xml element in Long value
  
  @param reader the StAX reader
  @param key The key
  @param expressions The expressions
  @return the long representing element
  @throws XMLStreamException StAX exception
  @throws ParserException in case it isn't a number