Locates and replaces any variable declaration with format ${name} contained into the specified string with the variable value converted to string (
Object.toString()
).
To obtain the value the method {@link #getVariable(String)} is called,if no variable is found the variable declaration is kept as is.
The same variable may be repeated.
@param str the source string to resolve declared variables.
@return the new string with replaced variables by values. If no variable was replaced (the original string is untouched) returns null.
@see #resolve(org.w3c.dom.Node)