public XmlPath param(String key, Object value) {
        XmlPath newP = new XmlPath(this, getXmlPathConfig());
        if (newP.params == null) {
            newP.params = new HashMap<String, Object>();
        }
        newP.params.put(key, value);
        return newP;
    }
public XmlPath param(String key, Object value) {
        XmlPath newP = new XmlPath(this, getXmlPathConfig());
        if (newP.params == null) {
            newP.params = new HashMap<String, Object>();
        }
        newP.params.put(key, value);
        return newP;
    }
public XmlPath param ( String key , Object value ) { XmlPath newP = new XmlPath ( this , getXmlPathConfig ( ) ) ; if ( newP . params == null ) { newP . params = new HashMap < String , Object > ( ) ; } newP . params . put ( key , value ) ; return newP ; }
Add a parameter for the expression. Example:
<pre>
String type = System.console().readLine();
List&lt;Map&gt; books = with(Object).param("type", type).get("shopping.category.findAll { it.@type == type}");
</pre>

@param key   The name of the parameter. Just use this name in your expression as a variable
@param value The value of the parameter
@return New XmlPath instance with the parameter set
Add a parameter for the expression . Example : <pre > String type = System . console () . readLine () ; List&lt ; Map&gt ; books = with ( Object ) . param ( type type ) . get ( shopping . category . findAll { it . @type == type } ) ; < / pre >