// by System.getProperties() (which is actually a Map<Object, Object>)
// contains only String keys.
@SuppressWarnings("unchecked")
Map<String, Object> systemProperties =
(Map<String, Object>) (Object) System.getProperties();
MultiVariableExpander expander = new MultiVariableExpander();
expander.addSource("$", systemProperties);
// allow expansion in both xml attributes and element text
Substitutor substitutor = new VariableSubstitutor(expander);
digester.setSubstitutor(substitutor);
}