Sorry , I didn't follow the format of posting to the group. Well I am new to xml and python . What I basically want to do is to read elements from the xml which is by the way large ~2GB and read the attributes and make a decision as to whether i want to keep that element or not . I am told that xml.sax is good for reading a large xml file because it can read from a stream but what about writing the xml file back Thank you for your help.
On Wed, Oct 22, 2008 at 1:49 PM, Alan Gauld <[EMAIL PROTECTED]>wrote: > "amit sethi" <[EMAIL PROTECTED]> wrote > > Please, always use a meaningful subject line when posting! > and do not reply to an existing thread, changing the subject. > These things mess up threaded reading tools such as gmane > and newsreaders. This reduces your chances of a reply. > > Hi can any body give me an example as to how i can use Incremental Parser >> in >> xml.sax >> > > If you look in the XML Topic Guide section of the Python web site there > is a full tutorial on using SAX. This is a good starting point: > > http://pyxml.sourceforge.net/topics/docs.html > > But frankly I'd strongly advise you to look at ElementTree if you are > parsing XML. Its much easier to use. The only time I'd use sax nowadays > is if I was porting code from some other sax based solution. > > http://effbot.org/zone/element-index.htm > > -- > Alan Gauld > Author of the Learn to Program web site > http://www.freenetpages.co.uk/hp/alan.gauld > > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > -- A-M-I-T S|S
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor