On 10/31/13 13:20, Sayth Renshaw wrote: > Hi > > Looking for some guidance using SQLAlchemy. In particular using > SQLAlchemy to parse an XML file to the database.
Do you want to map an xml schema to a database schema, or you just are looking for advice on how to put the xml blob on a database? If the former, http://spyne.io/#s=sql&ser=Xml&show=Schema and http://spyne.io/docs/2.10/reference/util.html#spyne.util.xml.get_xml_as_object could help you get started. This way, you can persist an xml document efficiently in a relational database (numbers go to an int column, etc.) For the latter, Spyne has a PGXml type that saves an lxml.etree.Element instance to the xml column in a postgres database. https://github.com/arskom/spyne/blob/2_10/spyne/util/sqlalchemy.py#L196 Hope it helps. Best, Burak -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/groups/opt_out.
