Help on function dumps in module xmlrpclib: ¶

dumps(params, methodname=None, methodresponse=None, encoding=None, allow_none=0) ¶
data [,options] -> marshalled data ¶

Convert an argument tuple or a Fault instance to an XML-RPC ¶
request (or response, if the methodresponse option is used). ¶

In addition to the data object, the following options can be given ¶
as keyword arguments: ¶

methodname: the method name for a methodCall packet ¶

methodresponse: true to create a methodResponse packet. ¶
If this option is used with a tuple, the tuple must be ¶
a singleton (i.e. it can contain only one element). ¶

encoding: the packet encoding (default is UTF-8) ¶

All 8-bit strings in the data structure are assumed to use the ¶
packet encoding. Unicode strings are automatically converted, ¶
where necessary. ¶

[code=python] ¶
import xmlrpclib ¶

parameter = ( [1,2,3], {"1":2, "3":4} ) # a tuple ¶
xml = xmlrpclib.dumps(parameter, 'some_method') ¶
print xml ¶

[/code] ¶

But for the love of your (future) girlfried/boyfriend just use the xmlrpclib interface. (Which does everything for you.)