Python suds - Insert source xml node into factory -created object

In python suds, how do I insert a Raw XML node into an object created using the factory.create method while retaining all the attributes? Is there any _child field that I could use? Basically, how to use s: any child with Raw ()?

What I need to send:

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

I create a Script object with:

>>> scr = client.factory.create('Script')
>>> scr._Format = "raw"
>>> print scr
(Script){
    _Format = "raw"
}

Corresponding 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>
+3
source share

All Articles