Sorry , I didn&#39;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&nbsp; Thank you for your help.<br>
<br>On Wed, Oct 22, 2008 at 1:49 PM, Alan Gauld <span dir="ltr">&lt;<a href="mailto:alan.gauld@btinternet.com">alan.gauld@btinternet.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&quot;amit sethi&quot; &lt;<a href="mailto:amit.pureenergy@gmail.com" target="_blank">amit.pureenergy@gmail.com</a>&gt; wrote<br>
<br>
Please, always use a meaningful subject line when posting!<br>
and do not reply to an existing thread, changing the subject.<br>
These things mess up threaded reading tools such as gmane<br>
and newsreaders. This reduces your chances of a reply.<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi can any body give me an example as to how i can use Incremental Parser in<br>
xml.sax<br>
</blockquote>
<br>
If you look in the XML Topic Guide section of the Python web site there<br>
is a full tutorial on using SAX. This is a good starting point:<br>
<br>
<a href="http://pyxml.sourceforge.net/topics/docs.html" target="_blank">http://pyxml.sourceforge.net/topics/docs.html</a><br>
<br>
But frankly I&#39;d strongly advise you to look at ElementTree if you are<br>
parsing XML. Its much easier to use. The only time I&#39;d use sax nowadays<br>
is if I was porting code from some other sax based solution.<br>
<br>
<a href="http://effbot.org/zone/element-index.htm" target="_blank">http://effbot.org/zone/element-index.htm</a><br><font color="#888888">
<br>
-- <br>
Alan Gauld<br>
Author of the Learn to Program web site<br>
<a href="http://www.freenetpages.co.uk/hp/alan.gauld" target="_blank">http://www.freenetpages.co.uk/hp/alan.gauld</a> <br>
<br>
_______________________________________________<br>
Tutor maillist &nbsp;- &nbsp;<a href="mailto:Tutor@python.org" target="_blank">Tutor@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>A-M-I-T S|S<br>