Hi,

I am looking for a way to convert SQLalchemy objects to XML and back, in 
order to support a webapplication. I made a mixin class that does a decent 
job on 'normal' python objects (basically works for in the same cases as 
pickle, though more testing is required). I would prefer to have a simple 
mixin interface with something like:

def toXML(): 
    'convert attributes to xml'
    return xmlstring

def fromXML(xmlstring)
    'update attributes from xml'

The most simple case would be that the web user request indicates the 
primary key of the object, gets the corrsponding xml string in return, 
changes fields in the xml string and posts it back, which leads to an 
update of the object. 

I have formulated a couple of initial questions:

-  what attributes should be converted to and from xml?
-  how do i handle foreign keys on the 'other' side?

Note that the object remains in memory during the user interaction, so it 
does not have to be reinitialized from scratch.

Cheers, Lars

 

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sqlalchemy/-/QaC2CW65FVgJ.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to