public static XNElement createRequest ( String function , Object ... nameValue ) { XNElement result = new XNElement ( function ) ; for ( int i = 0 ; i < nameValue . length ; i += 2 ) { result . set ( ( String ) nameValue [ i ] , nameValue [ i + 1 ] ) ; } return result ; }
Create a request with the given function and name - value pairs .