Re: [BangPypers] Access xml file form python script

2010-10-31 Thread Pradeep Gowda
On Sun, Oct 31, 2010 at 7:42 AM, Avinash TM wrote: > Hi All, > > I have created a simple xml document i.e., preferences.xml as follows > > > >   >   Cricket >   >     > >   >   > This looks like xml generated by a Microsoft product, and not by/for a human.. How is this better than:

Re: [BangPypers] Access xml file form python script

2010-10-31 Thread Sujit Ghosal
Hi Avinash, Expat module can be used to fetch the elements out of the XML document. Hope that helps. - Sujit On Sun, Oct 31, 2010 at 6:47 PM, Noufal Ibrahim wrote: > On Sun, Oct 31 2010, Avinash TM wrote: > > > Hi All, > > > > I have created a simple xml document i.e., preferences.xml as f

Re: [BangPypers] Access xml file form python script

2010-10-31 Thread Noufal Ibrahim
On Sun, Oct 31 2010, Avinash TM wrote: > Hi All, > > I have created a simple xml document i.e., preferences.xml as follows > > > > >Cricket > > > > > > [...] The elementree module can help you parse this. Docs available here http://docs.python.org/library/xml.etree.ele

[BangPypers] Access xml file form python script

2010-10-31 Thread Avinash TM
Hi All, I have created a simple xml document i.e., preferences.xml as follows Cricket Now i want to access the above data from a python script. I gone through some websites. But not getting actual idea. Should i use any data structures ( Lists, Dictionary, Tuples) in