Thanx Dennis Lee Bieber for ur suggestion.
After following ur suggestion i am getting 3 list after reading and comparing the 2 xml document. <directory>+<filename>,<modified time> adds ['/home/moq/buc/2+add.py,200606281354\r \n', '/home/moq/buc/1+add.py,200607031215\r \n'] Modified ['/home/moq/buc/2+mod2.py,200607111031\r \n', '/home/moq/buc/1+mod.py,200607111031\r \n'] deletes ['/home/moq/buc/2+del.py,200606281354\r \n', '/home/moq/buc/1+del.py,200607031215\r \n'] I have to put these in to an xml format of type <changes> <added> <directory> <dirname>/home/moq/buc/2</dirname> <file> <name>add.py</name> <time>200606281354</time> </file> </directory> <directory> <dirname>/home/moq/buc/1</dirname> <file> <name>add</name> <time>200607031215</time> </file> </directory> </added> </changes> Similarly for Modified and deleted. can someone help me with the code for this. Thanx -- http://mail.python.org/mailman/listinfo/python-list