[Fedora-suds-list] XML literal within an element
Janne Kuuskeri
jedi at mobisoft.fi
Thu Jan 14 01:10:40 UTC 2010
Thanks for you quick response.
> We could do one of two things:
>
> 1) Add an option to suppress this optimization.
> 2) Add a flag on the Document/Element classes that would cause them
> to be excluded from the optimization.
>
> For now, I like #2 because it put the functionality in the sax package
> where it belongs. You would do something like this:
> >
> > from suds.sax.parser import Parser
> > p = Parser()
> > xml = p.parse('order_sample.xml')
> > xml.prefixOptimize(False) # <------------------- SOMETHING LIKE THIS
> > client = Client(WSDL_URL)
> > result = client.service.AddOrder(document=xml)
> >
>
> What do ya think? I can add to 0.3.9 beta very quickly :)
Either solution would work for me. Although what I would like even more
is an option to disable the "tampering" of an element data altogether.
So, suds would just send whatever data I assign to that element (in this
case the 'document' element). I'm guessing there is a good reason that
there isn't such an option already,
If you decide to add any of these features into SUDS I would surely
appreciate it and can you let me know so I can update right away.
Thanks again,
Janne
More information about the suds
mailing list