[XML-SIG] XML parsing and Deletion Of Files
Hannu Krosing
hannu@tm.ee
Fri, 24 Aug 2001 07:32:55 +0500
Darius Teo wrote:
>
> Hi,
>
> I am doing XML parsing with Python. I learnt my parsing codes from the XML parsing example from
> this website:
> http://py-howto.sourceforge.net/xml-howto/SAX.html
>
> >From that example, I could only send in XML as a file and not as a message.
You can try to use StringIO "files"
import StringIO
f = StringIO.StringIO('yourstring')
> For my application, I find it still acceptable as I created XML files to overcome that problem.
>
> But after parsing through the XML file, I tried to delete it and was given a Permission Denied error. I have to delete the file because I am only using that file temporarily.
>
> That was after I closed the file. Anyone can help? I will be grateful. :-)
Did you close both the writing and readin sides ?
-------------
Hannu