Re: XML to dict(d)

2011-01-31 Thread Stefan Behnel
Daniel Stender, 31.01.2011 15:14: I've found that there is the library python-dictdlib for concatenating dict dictionaries, what would be the best way to "de-XML" the source file? How do you want to the dict to look like? What's in should be the "search word", the rest altogether belonging t

Re: XML to dict(d)

2011-01-31 Thread Daniel Stender
>> I've found that there is the library python-dictdlib for concatenating >> dict dictionaries, what would >> be the best way to "de-XML" the source file? > > How do you want to the dict to look like? > > Stefan What's in should be the "search word", the rest altogether belonging to that in a

Re: XML to dict(d)

2011-01-31 Thread Stefan Behnel
Daniel Stender, 31.01.2011 13:45: we are trying to convert a Sanskrit dictionary which is in a "homegrown" XML format into dict(d), the input file goes like this: 200akAlikam2a-kAlikam ind. immediately MBh.000173 2,2 266 110akAlya2a-kAlya mfn. unseasonable.000174 2,2 267 110ak

Re: XML to dict(d)

2011-01-31 Thread Neil Cerutti
On 2011-01-31, Daniel Stender wrote: > Hi guys, > > we are trying to convert a Sanskrit dictionary which is in a > "homegrown" XML format into dict(d), the input file goes like > this: xml.etree.ElementTree will parse your file and return it as a hierarchy of dict-like Element objects. -- Neil

XML to dict(d)

2011-01-31 Thread Daniel Stender
Hi guys, we are trying to convert a Sanskrit dictionary which is in a "homegrown" XML format into dict(d), the input file goes like this: 200akAlikam2a-kAlikam ind. immediately MBh. 000173 2,2 266 110akAlya2a-kAlya mfn. unseasonable. 000174 2,2 267 110akAsAra1a-kAsAra m. N._of_a_teacher B