[XML-SIG] Marshalling

A.M. Kuchling akuchlin@cnri.reston.va.us
Sun, 27 Dec 1998 11:30:28 -0500


I've been working on the XML marshalling some more, and have
implemented handling of Python instances.  In the generic module, 
instances are marshalled as:

<object module="__main__" class="A">
  <tuple>... init args</tuple>
  <dictionary> ... contents of __dict__ ... </dictionary>
</object>

I don't know what to do for WDDX and XML-RPC, if anything.

Earlier, I wrote:
 > 	Probably data_stack shouldn't be an attribute of the class,
 > but be passed to each of the unmarshalling functions.  That would mean
 > that the Marshaller class would have no mutable attributes at all, and
 > the self.__class__ thing would be unnecessary.

	Unfortunately, I realized this isn't possible because I'm
using SAX to parse the XML when unmarshalling, and that gives me no
way to pass in an additional argument.  So the self.__class__() hack
has to stay.

-- 
A.M. Kuchling			http://starship.skyport.net/crew/amk/
Perhaps they are leaving the village. They are going up to the high place, to
wait there for the end of their world. And here in my room (I will be fifty
soon. I wonder if I will see that birthday, if I will be here to
celebrate?)... all alone, I am going with them.
    -- The director's last screenplay in SIGNAL TO NOISE