I'm using Python3 and the xmlrpc.client lib. The docs seem a bit sparse, but that's probably because I'm new to xmlrpc.
I need to send the following xml in string format, as a parameter to a search method. How do I do this?
<EntitySearch listing='4'>
<SearchResult field='first_name'/>
<SearchResult field='last_name'/>
<SearchResult field='preferred_name'/>
<SearchByField field='last_name' op='equal'><s>Bloggs</s></SearchByField>
</EntitySearch>
I'm able to use python objects and lists where standard xml for rpc requests is used, but in cases such as this, where the xml is very specific, I'm clueless!
Any advise will be welcomed!
It turns out I merely needed to send the XML as a multi line string:
searchData = """<EntitySearch listing='4'>
<SearchResult field='first_name'/>
<SearchResult field='last_name'/>
<SearchResult field='preferred_name'/>
<SearchByField field='last_name' op='equal'><s>Bloggs</s></SearchByField>
</EntitySearch>"""