A great thanks for all monks, i will try Pureperl option and will update ..so that if someone has any similar need that of mine can use it. In mean time i am using graffs modified code which works for me.
Thanks for the ideas of using net versions of xml validator. But the problem is the system doesnt have connection to internet. Thank you all again. You guys have really gievn me lot of solutions within 5 hours of my post. And i am really proud of perl community.