On Thursday, October 31, 2013, Simon King wrote: > On Thu, Oct 31, 2013 at 11:20 AM, Sayth Renshaw wrote: > > Hi > > > > Looking for some guidance using SQLAlchemy. In particular using > SQLAlchemy > > to parse an XML file to the database. > > > > I have read the docs in SQLAlchemy on creating database and classes and > > tables and then started reading > > http://docs.sqlalchemy.org/en/rel_0_9/orm/index.html?highlight=xml > > However i want to understand the end process of importing the XML in and > > considerations and restrictions of this. Finding a lot of my search > results > > are returning 'persisting xml' tutorials and examples, or very basic > > examples of typed in database entries (album, artist examples etc) > > > > Can anyone help advise how I would go about this? Any tutorials or > > information appreciated. Have read tutorials on lxml and elementree as > well > > but again I don't understand if SQLAlchemy needs me to parse via this > first > > if so what is important to understand, or has SQLA another mechanism for > > handinling importing XML nodes to classes? > > > > Thank you > > > > Sayth > > > > SQLAlchemy itself doesn't really have any relationship at all with > XML, but in the source distribution, there are some examples of how > you might import data from an XML file into a database. See: > > http://docs.sqlalchemy.org/en/latest/orm/examples.html#xml-persistence > > and > > > https://bitbucket.org/zzzeek/sqlalchemy/src/eee219bc7e0656fb8afa9879bda799ab1d71b285/examples/elementtree?at=master > > Which approach you follow really depends on how you are going to be > working with the data. > > Hope that helps, > > Simon > > -- > > Thanks Simon will have a look at these after work, I appreciate you taking the time to respond.
Sayth -- 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 sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/groups/opt_out.