PHP » PYTHON |
login |
register |
about
|
PYTHON xmlrpc_encode_request
is this article helpful?
|
Python replacement for PHP's xmlrpc_encode_request
[
edit
| history
]
Help on function dumps in module xmlrpclib:
dumps(params, methodname=None, methodresponse=None, encoding=None, allow_none=0) data -> 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. import xmlrpclib parameter = ( [1,2,3], {"1":2, "3":4} ) # a tuple xml = xmlrpclib.dumps(parameter, 'some_method') print xml But for the love of your (future) girlfried/boyfriend just use the xmlrpclib interface. (Which does everything for you.) xmlrpc_encode_request(PHP 4 >= 4.1.0, PHP 5) xmlrpc_encode_request — Generates XML for a method request DescriptionWarning
This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation may change without notice in a future release of PHP. This function should be used at your own risk. Parameters
Return ValuesReturns a string containing the XML representation of the request. Examples
Example #1 XMLRPC client functions example
<?php
See Also
|
more
Recently updated
more
Most requested
more
Last requests
|