title: How do I set XML attributes in SOAPpy with python?
body: <p>I am forming a SOAPpy request but I can't figure out how to set the attributes in a tag.  Here is my code:</p>
  
  <pre><code>url = wsdlfile = 'https://stats2.overture.com/ExternalSOAP/statsPMCAPI_1_0.wsdl'
  n = 'urn:yahoo:overture:stats:3.0'
  server = WSDL.Proxy(wsdlfile)
  server.soapproxy.config.dumpSOAPOut = 1
  server.soapproxy.config.dumpSOAPIn = 1
  result = server.getAvailablePmcReports(ReportAuth = {'username': username, 'cookie': YBY}, ReportRequest= '')
  print(result)
  </code></pre>
  
  <p>Which outputs this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema"&gt;
  &lt;SOAP-ENV:Body&gt;
  &lt;ns1:getAvailablePmcReports xmlns:ns1="urn:yahoo:overture:stats:3.0" SOAP-ENC:root="1"&gt;
  &lt;ReportRequest xsi:type="xsd:string"&gt;&lt;/ReportRequest&gt;
  &lt;ReportAuth&gt;
  &lt;username xsi:type="xsd:string"&gt;myuser&lt;/username&gt;
  &lt;cookie xsi:type="xsd:string"&gt;cookie here...&lt;/cookie&gt;
  &lt;/ReportAuth&gt;
  &lt;/ns1:getAvailablePmcReports&gt;
  &lt;/SOAP-ENV:Body&gt;
  &lt;/SOAP-ENV:Envelope&gt;
  </code></pre>
  
  <p>But what I want is this:</p>
  
  <pre><code>&lt;ReportRequest startRow="0" shownRows="200"&gt;
  </code></pre>
  
  <p>How do I add the attributes?
  Thanks.</p>