csv to XML converter crash and burn

Skip Montanaro skip at pobox.com
Sun Jul 8 11:38:22 EDT 2001


>>>>> "Julius" == Julius Welby <jwelby at waitrose.com> writes:

    Julius> I just got all public spirited and posted this:
    Julius> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66003

    Julius> It's a module for transforming csv to XML. It works fine for cvs
    Julius> strings where no escaped commas or "" appear but.....

    Julius> Unfortunately I now realise I didn't have a sufficient grasp of
    Julius> the csv format.

Julius,

You might want to take a look at Dave Cole's recently announced CSV parser:

    http://groups.google.com/groups?q=CSV&hl=en&group=comp.lang.python.*&safe=off&rnum=3&ic=1&selm=mailman.992813221.29993.clpa-moderators%40python.org

Use that for parsing, then restrict your code to generating XML.

-- 
Skip Montanaro (skip at pobox.com)
(847)971-7098




More information about the Python-list mailing list