I use Spyne framework to provide SOAP web service. I need to return something very similar to
<MyReturnObject>
<MyList>
<MyElement Name="Value1">value2</MyElement>
<MyElement Name="Value2">value3</MyElement>
</MyList>
</MyReturnObject>
I tried the following
class MyElement(ComplexModel):
Name = XMLAttribute(String)
class MyReturnObject(ComplexModel):
MyList = Array(MyElement)
but that would result in
<MyReturnObject>
<MyList>
<MyElement Name="Value1"/>
<MyElement Name="Value2"/>
</MyList>
</MyReturnObject>
Is there some way to specify a text value for a given attribute ? I really appreciate your help :)