python to xml export? what was the tool again?

Tony Scharf EMAIL HIDDEN
Mon Feb 22 20:28:10 CET 2010


On Mon, Feb 22, 2010 at 12:53 PM, Peter Korsten <peter at severity-one.com> wrote:
> How is the schema going to look like? Something like this?
>
> <dictionary>
>     <entry>
>         <key>key1</key>
>         <value>value1</value>
>     </entry>
>     ...
> </dictionary>
>

something like this...but a LOT more fields (a dozen at each level and
a few hundred in total).  The spec I was given calls for a rather
sophisticated structure.  I am hoping that I can at least find
something that will make it possible to avoid doing everything in
print statements.  That will take a long damn time to code out...

> If that is the case, you might consider just go over the dictionary
> (which is just an associative array) and do the 'XML encoding' with
> simple print statements.
>
> But perhaps you could give some more details of your requirements.

What I ultimately need to take a bunch of database tables and format
them into 'xml documents' using the model that I was given.  These
documents in this instance are insurance policies going back to the
early 80s.  They format they want has the main document, which has
several containers for sub objects (each policy, for example, will
have one or more endorsements and several different types of financial
transactions).  Because this is for a data migration, they also want
each field to be given certain specific attributes, specifically where
it came from, and a number assigned by the migration team which helps
them map where its going.

I am trying to find a better way than doing this all as print
statements, simply because its going to be a LOT of fields and thats a
LOT of prints statements.  If there is no other way, then I guess I'd
better get started.  I was hoping someone around here had perhaps done
this before and could help.

Tony



More information about the music-bar mailing list