is there any library or way exist from which I can convert my xml records to yaml format ?
This page has a pretty long discussion of the problem. It suggests a couple of Python libraries that could be used: Gnosis and generateDS.