python suds将原始xml节点插入factorycreated对象

2024-03-28 18:44:04 发布

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

在pythonsuds中,如何将原始XML节点插入通过工厂.创建方法,同时仍保持属性?有什么儿童区我可以用吗?基本上,如何在Raw()中使用s:any子元素?在

我需要发送的信息:

<web:Script Format="raw">
    <raw_xml_node foo="bar">stuff</raw_xml_node>
</web:Script>

我使用以下内容创建脚本对象:

^{pr2}$

相关WSDL:

<s:complexType name="Script">
    <s:sequence>
        <s:any/>
    </s:sequence>
    <s:attribute name="Format">
      <s:simpleType>
        <s:restriction base="s:string">
          <s:enumeration value="xhtml"/>
          <s:enumeration value="raw"/>
        </s:restriction>
      </s:simpleType>
    </s:attribute>
</s:complexType>

Tags: namewebnodeformatrawvaluescriptany