Re: serialize a class to XML and back

2013-05-31 Thread Schneider
On 25.05.2013 07:54, dieter wrote: Schneider writes: how can I serialize a python class to XML? Plus a way to get the class back from the XML? My aim is to store instances of this class in a database. In case you want to describe the XML data via an XML-schema (e.g. to exchange it with other

Re: serialize a class to XML and back

2013-05-31 Thread Schneider
On 26.05.2013 22:48, Roy Smith wrote: In article , Chris Rebert wrote: On May 23, 2013 3:42 AM, "Schneider" wrote: Hi list, how can I serialize a python class to XML? Plus a way to get the class back from the XML? There's pyxser: http://pythonhosted.org/pyxser/ My aim is to store inst

Re: serialize a class to XML and back

2013-05-27 Thread Irmen de Jong
On 27-5-2013 2:39, Roy Smith wrote: > In article <51a28f42$0$15870$e4fe5...@news.xs4all.nl>, > Irmen de Jong wrote: > >> On 26-5-2013 22:48, Roy Smith wrote: >> >>> The advantage of pickle over json is that pickle can serialize many >>> types of objects that json can't. The other side of the c

Re: serialize a class to XML and back

2013-05-26 Thread Roy Smith
In article <51a28f42$0$15870$e4fe5...@news.xs4all.nl>, Irmen de Jong wrote: > On 26-5-2013 22:48, Roy Smith wrote: > > > The advantage of pickle over json is that pickle can serialize many > > types of objects that json can't. The other side of the coin is that > > pickle is python-specific,

Re: serialize a class to XML and back

2013-05-26 Thread Irmen de Jong
On 26-5-2013 22:48, Roy Smith wrote: > The advantage of pickle over json is that pickle can serialize many > types of objects that json can't. The other side of the coin is that > pickle is python-specific, so if you think you'll ever need to read your > data from other languages, pickle is ri

Re: serialize a class to XML and back

2013-05-26 Thread Roy Smith
In article , Chris Rebert wrote: > On May 23, 2013 3:42 AM, "Schneider" wrote: > > > > Hi list, > > > > how can I serialize a python class to XML? Plus a way to get the class > back from the XML? > > There's pyxser: http://pythonhosted.org/pyxser/ > > > My aim is to store instances of this cl

Re: serialize a class to XML and back

2013-05-26 Thread Chris Rebert
On May 23, 2013 3:42 AM, "Schneider" wrote: > > Hi list, > > how can I serialize a python class to XML? Plus a way to get the class back from the XML? There's pyxser: http://pythonhosted.org/pyxser/ > My aim is to store instances of this class in a database. Honestly, I would avoid XML if you c

Re: serialize a class to XML and back

2013-05-24 Thread dieter
Schneider writes: > how can I serialize a python class to XML? Plus a way to get the class > back from the XML? > > My aim is to store instances of this class in a database. In case you want to describe the XML data via an XML-schema (e.g. to exchange it with other applications; maybe via WebSer

Re: serialize a class to XML and back

2013-05-23 Thread alex23
On May 23, 8:37 pm, Schneider wrote: > My aim is to store instances of this class in a database. Have you considered just pickling the classes instead? -- http://mail.python.org/mailman/listinfo/python-list

Re: serialize a class to XML and back

2013-05-23 Thread Burak Arslan
On 05/23/13 13:37, Schneider wrote: Hi list, how can I serialize a python class to XML? Plus a way to get the class back from the XML? My aim is to store instances of this class in a database. Hi, I'm working on a project called Spyne (http://spyne.io). With one object definition, you can

serialize a class to XML and back

2013-05-23 Thread Schneider
Hi list, how can I serialize a python class to XML? Plus a way to get the class back from the XML? My aim is to store instances of this class in a database. bg, Johannes -- GLOBE Development GmbH Königsberger Strasse 260 48157 MünsterGLOBE Development GmbH Königsberger Strasse 260 48157 Müns