[Tutor] XML parsing with SAX was Re: (no subject)

Alan Gauld alan.gauld at btinternet.com
Wed Oct 22 10:19:17 CEST 2008


"amit sethi" <amit.pureenergy at gmail.com> 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 




More information about the Tutor mailing list