lxml also can be used along with the elementtree. Personally I liked the element tree APIs and elegance.
On Tue, Nov 2, 2010 at 1:47 PM, Shashidhar P <shashidha...@gmail.com> wrote: > Hi Avinash, > There is simple python library for parsing the XML file, accessing data, > adding, editing. > It is LXML. You can refer its documentation at: http://codespeak.net/lxml/ > . > > On Tue, Nov 2, 2010 at 11:26 AM, Dhananjay Nene <dhananjay.n...@gmail.com > >wrote: > > > On Sun, Oct 31, 2010 at 5:12 PM, Avinash TM <avinas...@gmail.com> wrote: > > > > > Hi All, > > > > > > I have created a simple xml document i.e., preferences.xml as follows > > > > > > <?xml version="1.0"?> > > > <object> > > > <object name="category" value="cricket"> > > > <property name="title">Cricket</property> > > > <property name="subscribers"> > > > <element name="avinash"/> > > > <element name="prashant"/> > > > </property> > > > </object> > > > </object> > > > > > > > > > My favourite light weight tool for xml is minidom > > http://docs.python.org/library/xml.dom.minidom.html > > <http://docs.python.org/library/xml.dom.minidom.html> > > http://www.boddie.org.uk/python/XML_intro.html > > > > If you are needing simple xml parsing capabilities - it might just > suffice > > your needs and is built into python. > > > > > > > > > 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 my > > python > > > script. > > > Can anybody help me > > > > > > Thanks & Regards > > > Avinash > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers@python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > -- > > -------------------------------------------------------- > > blog: http://blog.dhananjaynene.com > > twitter: http://twitter.com/dnene > > _______________________________________________ > > BangPypers mailing list > > BangPypers@python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > Regards, > > Shashidhar N.Paragonda > shashidha...@gmail.com > +919449073835 > _______________________________________________ > BangPypers mailing list > BangPypers@python.org > http://mail.python.org/mailman/listinfo/bangpypers > _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers