python,curl,xm中的变量

2024-05-06 08:42:03 发布

您现在位置:Python中文网/ 问答频道 /正文

在FlushCacheonDP.xml公司名称:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
    <m:request xmlns:m="http://www.datapower.com/schemas/management" domain="XXXXX">
        <m:do-action>
            <FlushDocumentCache>
                <XMLManager class="XMLManager">default</XMLManager>
            </FlushDocumentCache>
            <FlushStylesheetCache>
                <XMLManager class="XMLManager">default</XMLManager>
            </FlushStylesheetCache>
        </m:do-action>
    </m:request>
</SOAP-ENV:Body>

我在python脚本中的curl调用中使用它,问题是我想用上面的xml调用curl,但是domain=“XXXXX”必须从数组中选择不同的字符串。在

我是这样称呼它的:

^{pr2}$

arrayDomain=['EOT','ITD_TEST',……,'NSOPR']

我可以多次调用相同的curl脚本,但它将是redandont 谢谢,谢谢你的帮助。在


Tags: orgenvhttpwwwbodyxmlcurlschemas