If you were starting a project with XML datasource using python

Steve Hayes hayesstw at telkomsa.net
Mon Jan 5 22:59:06 EST 2015


On Mon, 5 Jan 2015 03:54:06 -0800 (PST), flebber <flebber.crue at gmail.com>
wrote:

Hi

I need some advice on managing data in the form of xml. I will have to
repeatedly import a small xml file but with many complex attributes.

If I want to retain data integrity and keep the import process simple and
querying from the stored source simple what are my best options?

There are several options for converting XML into objects such as:
http://lxml.de/objectify.html
https://pypi.python.org/pypi/pyxml2obj/
http://eulxml.readthedocs.org/en/latest/xmlmap.html

I could push this as an embedded object into mongo and search from there.

Could ignore XML by just converting to json with something like xml2json and
pushing to many databases from there.

(reposted to fix the long lines produced by the lame GoogleGroups editor)

-- 
Steve Hayes from Tshwane, South Africa
Web:  http://www.khanya.org.za/stevesig.htm
Blog: http://khanya.wordpress.com
E-mail - see web page, or parse: shayes at dunelm full stop org full stop uk



More information about the Python-list mailing list