Kirt wrote: > i have walked a directory and have written the foll xml document. > one of the folder had "&" character so i replaced it by "&" > #------------------test1.xml > <Directory> > <dirname>C:\Documents and Settings\Administrator\Desktop\1\bye > w&y </dirname> > [...] > #----------------------------------------------------------------------------- > i run the code as: $python art.py test1.xml > > i am getting output as: > > C:\Documents and Settings\Administrator\Desktop\1\bye w > & > y > C:\Documents and Settings\Administrator\Desktop\1\hii wx > > where as i need an output which should look like this. > C:\Documents and Settings\Administrator\Desktop\1\bye w&y > > C:\Documents and Settings\Administrator\Desktop\1\hii wx
This SAX filter is another way of doing it: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/265881 Stefan -- http://mail.python.org/mailman/listinfo/python-list