Re: XML/encoding/prolog/python hell...

2007-04-14 Thread Stefan Behnel
with lxml (although untested): fscked wrote: > import os,sys > import csv from lxml.etree import Element, SubElement, ElementTree, tostring > root = Element("{Boxes}boxes") > myfile = open('ClientsXMLUpdate.csv') > csvreader = csv.reader(myfile) > > for row in csvreader: > mainbox = SubElem

Re: XML/encoding/prolog/python hell...

2007-04-14 Thread Stefan Behnel
fscked schrieb: > I am a beginning pythoner and I am having a terrible time trying to > figure out how to do something that (it would seeme to me) should be > fairly simple. > > I have a CSV file of unknown encoding and I need to parse that file to > get the fields <--- DONE > I need to create an

Re: XML/encoding/prolog/python hell...

2007-04-03 Thread fscked
Any ideas? -- http://mail.python.org/mailman/listinfo/python-list

Re: XML/encoding/prolog/python hell...

2007-03-29 Thread fscked
Here is what I currently have. Still missing prolog information and namespace info. Encoding is irritating me also. :) import os,sys import csv from elementtree.ElementTree import Element, SubElement, ElementTree, tostring def indent(elem, level=0): i = "\n" + level*" " if len(elem):

Re: XML/encoding/prolog/python hell...

2007-03-28 Thread Diez B. Roggisch
fscked schrieb: > I am a beginning pythoner and I am having a terrible time trying to > figure out how to do something that (it would seeme to me) should be > fairly simple. Show us code. As concise as possible. Then we might be able to help you. Diez -- http://mail.python.org/mailman/listinfo/p

Re: XML/encoding/prolog/python hell...

2007-03-28 Thread Gabriel Genellina
En Wed, 28 Mar 2007 15:06:28 -0300, <[EMAIL PROTECTED]> escribió: > You could probably also use a combination of the csv module and the > pyxml module (links below). > > http://pyxml.sourceforge.net/topics/ Note the pyxml summary page on SourceForge: "PyXML is no longer maintained." -- Gabrie

Re: XML/encoding/prolog/python hell...

2007-03-28 Thread fscked
[EMAIL PROTECTED] wrote: <---SNIP---> > I've never done this, but I found a recipe on the ActiveState website > that looks like it would be helpful: > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/159100 I tried looking at that but couldn't figure out how to get the property file wor

Re: XML/encoding/prolog/python hell...

2007-03-28 Thread kyosohma
On Mar 28, 12:40 pm, "fscked" <[EMAIL PROTECTED]> wrote: > I am a beginning pythoner and I am having a terrible time trying to > figure out how to do something that (it would seeme to me) should be > fairly simple. > > I have a CSV file of unknown encoding and I need to parse that file to > get the

XML/encoding/prolog/python hell...

2007-03-28 Thread fscked
I am a beginning pythoner and I am having a terrible time trying to figure out how to do something that (it would seeme to me) should be fairly simple. I have a CSV file of unknown encoding and I need to parse that file to get the fields <--- DONE I need to create an xml document that has the prop